From 803c27c5824455a38e7c290ad0cd1c559533db8a Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Wed, 4 May 2016 04:13:33 +0200 Subject: [PATCH] (iOS) Cleanups --- ui/drivers/cocoa/cocoatouch_menu.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/drivers/cocoa/cocoatouch_menu.m b/ui/drivers/cocoa/cocoatouch_menu.m index 5fac429730..f00a482dcd 100644 --- a/ui/drivers/cocoa/cocoatouch_menu.m +++ b/ui/drivers/cocoa/cocoatouch_menu.m @@ -640,12 +640,14 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath - (void)viewWillAppear:(BOOL)animated { char title_msg[256]; + UIBarButtonItem *item = NULL; + [self reloadData]; self.osdmessage = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 300, 44)]; self.osdmessage.backgroundColor = [UIColor clearColor]; - UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:self.osdmessage]; + item = [[UIBarButtonItem alloc] initWithCustomView:self.osdmessage]; [self setToolbarItems: [NSArray arrayWithObject:item]]; menu_entries_get_core_title(title_msg, sizeof(title_msg)); @@ -656,10 +658,8 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath { size_t i, end; char title[256], title_msg[256]; - NSMutableArray *everything; - RAMainMenu* __weak weakSelf; - - everything = [NSMutableArray array]; + RAMainMenu* __weak weakSelf = NULL; + NSMutableArray *everything = [NSMutableArray array]; menu_entries_get_core_title(title_msg, sizeof(title_msg)); self.osdmessage.text = BOXSTRING(title_msg);