Return to Snippet

Revision: 65504
at December 9, 2013 11:35 by cruddell001


Initial Code
1) In the viewWillAppear section, find the "//setup navigation bar and background" code. Add this below it: 

//setup navigation bar and background 
[BT_viewUtilities configureBackgroundAndNavBar:self theScreenData:[self screenData]]; 

//set backgroundView image/color 
NSString *bgColor = [BT_strings getJsonPropertyValue:screenData.jsonVars nameOfProperty:@"backgroundColor" defaultValue:@"clear"]; 
NSString *bgImage = [BT_strings getJsonPropertyValue:screenData.jsonVars nameOfProperty:@"backgroundImageNameSmallDevice" defaultValue:@""]; 
if ([appDelegate.rootApp.rootDevice isIPad]) { 
bgImage = [BT_strings getJsonPropertyValue:screenData.jsonVars nameOfProperty:@"backgroundImageNameLargeDevice" defaultValue:@""]; 
} 

if ([bgColor length]>0) { 
UIColor *bgColorObj = [BT_color getColorFromHexString:bgColor]; 
self.view.backgroundColor = bgColorObj; 
} 
if ([bgImage length]>0) { 
UIImageView *bgImageView = [UIImageView new]; 
bgImageView.frame = self.view.frame; 
[bgImageView setContentMode:UIViewContentModeScaleToFill]; 
if ([BT_fileManager doesFileExistInBundle:bgImage]) { 
bgImageView.image = [UIImage imageNamed:bgImage]; 
} 
else if ([BT_fileManager doesLocalFileExist:bgImage]) { 
bgImageView.image = [BT_fileManager getImageFromFile:bgImage]; 
} 
[self.view addSubview:bgImageView]; 
[self.view sendSubviewToBack:bgImageView]; 
} 

Initial URL

                                

Initial Description

                                

Initial Title
Easy iOS7 overlapping fix

Initial Tags

                                

Initial Language
Objective C