Hallo Community,
ich möchte ein Bild für ein toolbarbutton einbinden.
ich bekomme immer einen Fehler, weiß jemand weiter?
mein ursprungscode:
Alles anzeigen
gruß
ich möchte ein Bild für ein toolbarbutton einbinden.
ich bekomme immer einen Fehler, weiß jemand weiter?
mein ursprungscode:
Quellcode
- UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 158, 44.02)];//44.02
- NSMutableArray* buttons = [[NSMutableArray alloc] initWithCapacity:2];
- UIBarButtonItem *micButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Mic", nil)
- style:UIBarButtonItemStyleBordered
- target:self
- action:@selector(onClickMic:)];
- [buttons addObject:micButton];
- UIBarButtonItem *setButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"settings", nil)
- style:UIBarButtonItemStyleBordered
- target:self
- action:@selector(onClickSettings:)];
- [buttons addObject:setButton];
- [tools setItems:buttons animated:YES];
- [buttons release];
- self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:tools];
- [tools release];
gruß
lernen, lernen, lernen