No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''SBIconView''' is a [[UIView]] subclass introduced in iOS 5 that is used to display icons in [[SpringBoard.app|SpringBoard]]. | '''SBIconView''' is a [[UIView]] subclass introduced in iOS 5 that is used to display icons in [[SpringBoard.app|SpringBoard]]. In iOS 5 Apple split up the [[SBIcon]], creating a separate class for the view, and just leaving the [[SBIcon]] with behind the scenes stuff. | ||
=== Creating an Instance === | === Creating an Instance === | ||
<source lang="objc"> | <source lang="objc"> |
Revision as of 06:20, 10 February 2012
SBIconView is a UIView subclass introduced in iOS 5 that is used to display icons in SpringBoard. In iOS 5 Apple split up the SBIcon, creating a separate class for the view, and just leaving the SBIcon with behind the scenes stuff.
Creating an Instance
SBIcon *sbicon = [[objc_getClass("SBIconModel") sharedInstance] applicationIconForDisplayIdentifier:@"com.apple.MobileSafari"];
SBIconView *view = [[objc_getClass("SBIconView") alloc]initWithDefaultSize];
// set an SBIcon to get the display name and icon image
[view setIcon:sbicon];
view.delegate = self;
Delegate Methods
- (BOOL)iconAllowJitter:(SBIconView *)arg1 {
return YES;
}
- (BOOL)iconPositionIsEditable:(id)arg1 {
return NO;
}
- (void)iconHandleLongPress:(SBIconView *)arg1 {
[arg1 setIsJittering:YES];
}
- (void)iconTouchBegan:(SBIconView *)arg1 {
[arg1 setHighlighted:YES];
}
- (void)icon:(id)arg1 touchMovedWithEvent:(id)arg2 {
}
- (void)icon:(SBIconView *)arg1 touchEnded:(BOOL)arg2 {
[arg1 setHighlighted:NO delayUnhighlight:NO];
}
- (BOOL)iconShouldAllowTap:(id)arg1 {
return YES;
}
- (void)iconTapped:(SBIconView *)arg1 {
[arg1.icon launchFromViewSwitcher];
}
- (BOOL)icon:(id)arg1 canReceiveGrabbedIcon:(id)arg2 {
return NO;
}
- (int)closeBoxTypeForIcon:(id)arg1 {
return 1;
}
- (void)iconCloseBoxTapped:(id)arg1 {
}
- (BOOL)iconShouldPrepareGhostlyImage:(id)arg1 {
return YES;
}
- (BOOL)iconViewDisplaysBadges:(id)arg1 {
return NO;
}