uinavigationbar - ios UIBarButtonItem with UIBarButtonSystemItemCompose showing red button -
i trying add uibarbuttonitem style of uibarbuttonsystemitemcompose. according apple docs should display compose icon consists of square outline. when use following code displays red button. icon work if uibarbuttonitem if placed inside of uitoolbar , not navigation bar.
self.navigationitem.rightbarbuttonitem = [[[uibarbuttonitem alloc] initwithtitle:nil style:uibarbuttonsystemitemcompose target:self action:@selector(tweetpressed:)] autorelease];
you creating button incorrectly. need use proper init...
method.
uibarbuttonitem *btn = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemcompose target:self action:@selector(tweetpressed:)]; self.navigationitem.rightbarbuttonitem = btn; [btn release];
look @ docs init...
method used. @ type should passed style
parameter , @ valid values are.
Comments
Post a Comment