Getting Object allocation at UIBarButtons
        Posted  
        
            by Rani
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Rani
        
        
        
        Published on 2010-03-27T11:19:40Z
        Indexed on 
            2010/03/27
            11:23 UTC
        
        
        Read the original article
        Hit count: 318
        
objective-c
Hi guys,
   I'm getting allocation at UIBarbutton that i added to toolbar.
masterviewcontroller.h
UIBarButtonItem *markReadItems; UIBarButtonItem *markUnReadItems; UIBarButtonItem *refreshItems
masterviewcontroller.m -(id)init{ if(self = [super init]){
refreshItems = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshItems)]; markReadItems = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(markAllAsRead)];
    markUnReadItems = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop  target:self action:@selector(markAllAsUnRead)];
}
return self;
}
-(UIToolbar*)getToolbar
{
NSArray *items = [NSArray arrayWithObjects:refreshItems,markReadItems,markUnReadItems,nil];
        [__toolBar setItems:items animated:NO];
}
- (void)dealloc {
[refreshItems release];
[markReadItems release];    [markUnReadItems release];
}
Can any one help me to solve this. Thanks in advance.
© Stack Overflow or respective owner