Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 76

SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
03/25/16 02:31 AM (8 years ago)

iOS 'Device Information' plugin errata...

Hafa Adai folks. Finishing up the touches on an app, and I must have noticed it before, still... The 'device information' plugin (the free BT plugin that everyone has) does not have the control panel properties tied into the code. open the 'BT_screen_settingsDevice.m' file... Paste this in your 'cellForRowAtIndex': cell.accessoryType = UITableViewCellAccessoryNone; } // after that line above... NSString *swCellBGColor = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listRowBackgroundColor" defaultValue:@"#2F4F4F"]; NSString *swCellFont = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listTitleFontName" defaultValue:@"Chalkduster"]; NSString *swCellFontColor = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listTitleFontColor" defaultValue:@"#DDDDDD"]; NSInteger swCellFontSize = [[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listTitleFontSize" defaultValue:@"14"] integerValue]; NSString *cellDetailFont = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listDetailFontName" defaultValue:@"#Chalkduster"]; NSString *cellDetailFontColor = [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listDetailFontColor" defaultValue:@"#AAAAAA"]; NSInteger cellDetailFontSize = [[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listDetailFontSize" defaultValue:@"12"] integerValue]; [cell setBackgroundColor:[BT_color getColorFromHexString:swCellBGColor]]; [cell.textLabel setFont:[UIFont fontWithName:swCellFont size:swCellFontSize]]; [cell.textLabel setAdjustsFontSizeToFitWidth:true]; [cell.textLabel setTextColor:[BT_color getColorFromHexString:swCellFontColor]]; [cell.detailTextLabel setFont:[UIFont fontWithName:cellDetailFont size:cellDetailFontSize]]; [cell.detailTextLabel setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; [cell.detailTextLabel setTextColor:[BT_color getColorFromHexString:cellDetailFontColor]]; // and before this line below //this menu item BT_settingData *thisSettingItemData = [self.menuItems objectAtIndex:indexPath.row]; and in your viewDidLoad method, just before you set your table datasource and delegate, paste this: [self.myTableView setBackgroundColor:[BT_color getColorFromHexString:[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listBackgroundColor" defaultValue:@""]]]; [self.myTableView setSeparatorColor:[BT_color getColorFromHexString:[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"listRowSeparatorColor" defaultValue:@""]]]; and you should be good. iOS only for the moment. Cheers! -- Smug
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/25/16 02:59 AM (8 years ago)
Out of interest why do people use this plugin. I've noticed a lot of people use this.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/25/16 03:08 AM (8 years ago)
I use it as a 'gimme' plugin... 'added value' for clients that is almost a no brainer. Does it do anything? nothing useful, lol! but it's more bells and whistles to make'em feel good. At least, that's my take on it. How ya doing, kittsy!? Cheers! -- Smug
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/25/16 03:11 AM (8 years ago)
I'm alright plodding along. I'm a minimalist the fewer screens the better. I've seen loads that use those types of plugins here as well as the token torch app, random game of pong and have a whole menu screen dedicated to utility apps I suppose if you charge for it and they pay it's all good
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.