Discussion Forums  >  Uncategorized

Replies: 14    Views: 297

samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
04/12/11 08:10 AM (14 years ago)

Lock list header image?

I have an RSS screen with a header image. I want the header image to lock in place and the list items to scroll under the header. Is this possible?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 09:00 AM (14 years ago)
You could do this with v1.5 by making some adjustments, it is a bit techie and may be too much for some to pull-off. a) Find BT_screen_menuList.m in the BT_screens folder b) Scroll down to about like 102 and look for [self.myTableView setTableHeaderView:headerImageView]; This line of code adds the image to the lists header (the list is self.myTableView) c) Change this line to [self.view addSubView:headerImageView] This will add the image to the screen and not the table which should prevent it from moving with the table. You'll need to tweak the Header Height of the table in the control panel to get the table to move down so it's not on top of the image. Experiement with the round vs plain table styles and a few other adjustments and it should work like you described.
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
04/12/11 09:32 AM (14 years ago)
cool I've been thinking about it too!
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
04/12/11 10:02 AM (14 years ago)
I made the change to the code, but it created this issue. /BT_Screens/BT_screen_menuList.m:102: warning: 'UIView' may not respond to '-addSubView:' Any thoughts? Did I miss somthing?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 10:08 AM (14 years ago)
Typo: In fact, Xcode should hightlight these? [self.view addSubview:headerImageView]; notice the addSubview, the 'v' is not capital. sorry, coding in forum is super bogus ;-)
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
04/12/11 10:14 AM (14 years ago)
That fixed the issue, but the header image still scrolls with the list(table).
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 10:22 AM (14 years ago)
That sucks. Ah... maybe the table is still 'full size' and starting at the top... Let's try to make the table a bit smaller, then move it down the screen a ways, like a few hundred pixels so... this is done by adjusting the tables frame.. Directly under this line:= (about line 79) [self.myTableView setDelegate:self]; Adjust the size and position of the table like... [self.myTableView setFrame:CGRectMake(0, 200, 320, 480)]; 0 is x value (left) 200 is y value (top, or down) 320 is width of table 480 is height of table. Oh, one other thing I didn't consider...these hard-coded values will change the look of every menu in your app? This may or may not be ok? You could do some conditional checks to only change one screns table. Something like.... If([BT_strings getJsonPropertyValue:theScreenData.jsonVars:@'guid':@'the unique id of the screen from control panel']){ //do the adjustments here... } hope this make sense.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 10:24 AM (14 years ago)
The conditions to do this for some screens and not others is psuedo code. If you need to do that we'll need to get the syntax right. Funny.
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
04/12/11 10:35 AM (14 years ago)
Your right, this does suck. I may be missing something because that still does not do it. I did reset the simulator and cleaned the build. but nothing changed.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 10:53 AM (14 years ago)
Lets do this: a) What's the app name your working with (in the control panel) b) What screen nickname are you wanting the image to not move on. The nickname of the menu. c) I'll grab your project...adjust it and email the adjusted file to you d) You'll replace this file (the one I email to you) in your project.
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
04/12/11 11:04 AM (14 years ago)
Cool, Thanks for the help. This is my first app and I'm still learning. App name Cornerstone Screen nickname Sunday Messages
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 11:32 AM (14 years ago)
Check your email: Laughing... I was looking at BT_screen_menuList - you asked about a RSS feed! This is a different file. My bad. So.. I'm looking at the app and don't see where Sunday Message is being used. In other words, no buttons lead to it. Where did you intened on showing this screen? I added a temporary button to your list of buttons on the home screen to load the view. Remove this button in your control panel if you want. I have tested the changes and they work good ;-)
 
samme71
Apple Fan
Profile
Posts: 29
Reg: Apr 10, 2011
South Carolina,...
3,840
like
04/12/11 12:26 PM (14 years ago)
Buzztouch rocks! That worked great. Exactly how I wanted. I would love to know the xcode changes you made Sunday Messages is accessed from the Messages button on the home screen This has been a lot of fun and a great learning experience. I'm so glad I found you guys and thanks for all the help.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/12/11 05:33 PM (14 years ago)
Glad it worked out. To see the adjustments.. have a look at the source code in BT_screen_rssReader.m that I included in the email. You'll see my notes about what changed and you'll be able to see the logic. Also.. be sure to keep this file. If you re-download the source to your project it wont' include these changes...you'll need to over-write the BT_screen_rssReader.m file with the one I sent if you re-download the project. This brings up a good point though, we'll try to get an option added in the Advnaced Settings of these screen types to allow header image to be 'fixed' or 'moves with menu'
 
Don Javi
Aspiring developer
Profile
Posts: 91
Reg: Oct 08, 2011
Burriana
910
like
01/14/12 01:39 AM (14 years ago)
I'm trying to set the header image of a menu list. I put the code that put David up [self.myTableView setFrame: CGRectMake (0, 200, 320, 480)]; And it's a funny thing, the problem is that it behaves differently in the iphone. I put a new forum post asking for advice on how to fix the header, and everyone tells me that BT 1.5 can not be, I have to put BT Server, but now I can not, in the next app I will. If I could I'd appreciate help with the heart.
 

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.