Discussion Forums  >  Self Hosted Control Panels

Replies: 5    Views: 77

andydahl
Aspiring developer
Profile
Posts: 209
Reg: Jul 20, 2011
Villa Grove
4,540
08/13/12 12:51 PM (13 years ago)

Add top margin to Location screen?

Thanks for your help with this. Unfortunately, I just can't seem to get some extra space on my app. Here's a screenshot to show what I'm trying to accomplish: https://www.dropbox.com/s/n5dqqhbcb5at1vk/header-issue.png I just need to move the "Prevent Location Reports" down below the custom navbar. Any help with editing the BT_screen_settingsLocation.m file in BT 2.0 Self-Hosted would be appreciated! I'd happily buy someone a beer or Starbucks for some help! Regards, Andy
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 02:46 PM (13 years ago)
Ah..before I dig into this, how did you get the cool tab bar icons looking like that, with the curve on top? Very nice looking. Hoping Apple allows this? They should but I've not seen those before. Well done. Next question: It's obvious that you've figured out how to add an image to the nav bar, great. I'll bet you changed the height of the nav bar from the standard 44px to something a bit taller to accomodate your image. No worries. It's all about the "frame" that holds the UITableView in the settings plugin. Have a look at BT_screen_settingsLocation.m file in your iOS project. Scroll down to about line 67 and find this: self.myTableView = [BT_viewUtilities getTableViewForScreen:[self screenData]]; That line in english: "Hey BT_viewUtilities class, get me a table view for this screen." When this table view is created, it's created with a frame. In iOS frames control layout. So, you should be able to make a new frame and "reset" it's position. Just above this line: [self.myTableView setDataSource:self]; (which is just after the line above), create a new frame then apply it to the UITableView all in one line. [self.myTableView setFrame:CGRectMake(0, 60, 320, 400)]; You may need to experiment with the size. That example is "left, top, width, height" or zero pixels from left edge, 60 pixels from top edge (just under your banner image), 320 pixels wide and 400 pixels tall. Hight may need to get shorter for your tab bar? Dunno. Bet it works ;-)
 
andydahl
Aspiring developer
Profile
Posts: 209
Reg: Jul 20, 2011
Villa Grove
4,540
like
08/13/12 03:31 PM (13 years ago)
Thanks for your time David! I appreciate the help! The top bar is thanks to JC Evans for sharing his technique here: http://www.buzztouch.com/forum/thread.php?tid=C1FEA6BE49701EE749955DD&currentPage=1 ) It really allows you to change the look/feel of the whole app! However, now I'm paranoid that Apple will reject it! :) Hope that doesn't happen, but if it does, I'll redo it! Thanks again for all your help! I'll tackle this as soon as I get some time and report back. Regards, Andy
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/13/12 03:47 PM (13 years ago)
No worries. The Top Bar shouldn't be an issue, it's common to customize this part of an iOS app. The part I was wondering about is the lower tab bar. It's nearly standard iOS looking but the currently selected tab appears to have a rounded top edge. This looks awesome but I'm worried that Apple may thing you've gone "outside the scope of their famously draconian Human Interface Guidelines." Who knows. I would FOR SURE leave it unless they gripe about it. It adds a professionally polished touch that nearly NO apps have (in the bottom bar). Peace.
 
MDG2
Apple Fan
Profile
Posts: 102
Reg: May 08, 2012
Princeton, New ...
5,020
like
08/13/12 04:09 PM (13 years ago)
David, Here is the link to do the bottom bar center tab effect. http://jc-evans.com/blog/2012/08/03/tab-bar-with-custom-center-tab-in-a-bt-app/ -Vince
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/14/12 07:59 AM (13 years ago)
Instagram used to have that rounded TAB. So did Twiter for a spell IIRC. That TAB is really an IDEAL spot for a company logo. Stick that in an app and put their logo there and show it to a customer. You'll get the project. His Michigan Football app with the custom tab did recently go thru the review. He had other issues with lienesing, but the custom tab was not one. I've got an app using it sitting in the review queue currently... and great advice here on modding that table view/layout, noted for future use. thanks David!
 

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.