Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
SBIconView - iPhone Development Wiki

SBIconView

From iPhone Development Wiki
Revision as of 06:07, 10 February 2012 by Otium (talk | contribs) (Created page with ''''SBIconView''' is a UIView subclass introduced in iOS 5 that is used to display icons in SpringBoard. === Creating an Instance === <source lang="objc"> …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SBIconView is a UIView subclass introduced in iOS 5 that is used to display icons in SpringBoard.

Creating an Instance

   SBIcon *sbicon = [[objc_getClass("SBIconModel") sharedInstance] applicationIconForDisplayIdentifier:[icondict objectAtIndex:i]];
   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;
}