objective c - Error Message no visible @interface for UIToolbar declares the selector 'setItems:animated:' -
i'm building uisplitviewcontroller code:
- (void)splitviewcontroller:(uisplitviewcontroller *)svc willhideviewcontroller:(uiviewcontroller *)aviewcontroller withbarbuttonitem:(uibarbuttonitem *)barbuttonitem forpopovercontroller:(uipopovercontroller *)pc { barbuttonitem.title = @"customers"; nsmutablearray *items = [[self.toolbar items] mutablecopy]; [items insert0bject:barbuttonitem atlndex:0]: [self.toolbar setitems:items animatd:yes]; masterpopovercontroller = pc; } - (void)splitviewcontroller: (uisplitviewcontroller *)svc willshowviewcontroller: (uiviewcontroller *)aviewcontroller invalidatingbarbuttonitem: (uibarbuttonitem *)button { nsmutablearray *items = [[self.toolbar items] mutablecopy]; [items removeobject:button]; [self.toolbar setitems:items animatied:yes]; masterpopovercontroller = nil; }
i'm getting same error on 2 different lines: on line
masterpopovercontroller = pc;
and
[self.toolbar setitems:items animatied:yes];
xcode shows me error
no visible @interface 'uitoolbar' declares selector 'setitems:animatd' (or 'setitems:animatied' in second)
how correct this?
replace current code with:
[self.toolbar setitems:items animated:yes];
Comments
Post a Comment