Discussion Forums  >  Uncategorized

Replies: 7    Views: 502

Davidwigl
Lost but trying
Profile
Posts: 16
Reg: Aug 02, 2011
Washington DC
160
08/17/11 01:20 PM (14 years ago)

Row select color other than blue, gray, none?

Is there a way to program individual rows to have individual row select colors other than blue or gray or no color at all?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/18/11 12:21 PM (14 years ago)
You can but it takes some tinkering. Assuming you're using v1.5, have a look at the BT_cell_menuList.m file in the Xcode project. It's in the BT_Objects folder. Scroll down to line 321 and you'll see where the row-select-color is set. This is where you'll want to make your adjustments.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/19/11 12:15 AM (14 years ago)
Hi David, any way to change the select row color in v1.4 as well?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/19/11 01:21 PM (14 years ago)
v1.4 has uses two different UITableView objects. One on the app's home screen and one on any Sub-Menus. In both cases, you'll want to modify the UITableViewCell that is created in the cellForRowAtIndexPath method. For the home screen, this starts on line 548 in the AppViewController.m file For a sub-menu screen, this starts on line 280
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/19/11 11:47 PM (14 years ago)
Hi David, I'm poppin up all over tonight! So how would I go about changing the blue row color selector in these screens? I found the locations you mentioned in the AppViewController.m file but where to change color? Is the blue row selector The default color so I don't see any parameters to change here? Thanks again and again....
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
08/20/11 01:10 AM (14 years ago)
This is for v1.4 row selection color of Blue.Gray, & None i added this after line 548 to change home screen row select color in Appviewcontroller.m cell.selectionStyle = UITableViewCellSelectionStyleGray; then the same code after line 280 in Submenuviewcontroller.m cell.selectionStyle = UITableViewCellSelectionStyleGray; Do you think i have created any memory leaks just adding this? Seems to work fine....hope this helps others out. Be cool if i could change to any custom color as well
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
09/07/11 11:59 AM (14 years ago)
David, sorry for my newbishness.... But I found the cell selection style section of the BT_cell_MenuList.m file, but I'm not sure how to change anything. It looks more like a case statement that is setting up the UITableView settings, but I was hoping to find something as easy as if @blue then use #0000FF (paraphrased, of course). Thanks for any help on this.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/08/11 10:07 AM (14 years ago)
Yup, understand. So, it's all about setting your own 'custom' view to use for the background. Just get rid of all the case-logic you see and ignore than. Then, create a basic view with a backgound color of you choice and set it as the selectedBackgroundView. See this for tips... I know you can pull this off! http://stackoverflow.com/questions/1485678/need-to-change-the-color-of-table-view-selection
 

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.