Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 54

Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
08/14/12 05:05 PM (11 years ago)

changing uitableview selection identifier in menu simple

I have been hacking up this plugin, and I finally got my circle table view to work , and I have added a cell image instead of an cell accessory view,(so image is on the left & it auto scales) But now I want to be able to change the color of the text within a tables cell when selected. Currently the BT control panel lets you change the default highlight of the complete cell, but what I was hoping to do is leave this to "none" , and change the text color once the cell is selected. Highlighting the whole cell ruins the look of the circle view. I know the current options have to be a JSON variable, but I could hard code the change to color. Has anyone tried this? I will keep digging, but wanted to throw it out. Thanks, Jim
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
08/14/12 06:12 PM (11 years ago)
I have been reading apples documentation for this, and I have now declared these in the .h (wanted to try both) @property(nonatomic, getter=isHighlighted) BOOL highlighted; @property(nonatomic, retain) UIColor *highlightedTextColor; Now I am assuming I need to call it in the .m, (with something like this - customLabel.highlightedTextColor = [UIColor whiteColor];) but the label is a JSON variable, so I am lost as where to call it. Need a little help from the experts here...
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/15/12 07:01 AM (11 years ago)
Nice work, still at it. Anxious to see this end product on the BT market soon. Loved the layout when you posted the link. I've been looking at the code in the simplemenuscreen now to try and make an audio player that selects from a menu list conneted to the CP. Early stages here and it is a new screen/plug-in, i just copied the menucode to a new plug-in screen. easy now with that new tool! David posted this in the plug-in thread and it was HUGE help to get me going with JSON. Maybe there is something in this post of his that might assist you? here's snippet that was key for me. (Don't think CODE - think STEPS and then create CODE) (full post in the 'let the plug-ins begin' thread...) ----- b) When the row is tapped, you would grab the JSON data, setup the download or song file, then "slide up" or "slide in" or "fade in" the UIView that holds all the controls. The row tap would tell you want text title to show in your view (you added a UITextView for the title, right?) the song to play, etc. //get the JSON values for the row that was tapped...Have a look at the current menu, it shows you how to do this. Something like... self.tappedSongName = [BT_strings getJsonPropertyValue:thisMenuItem.jsonVars:@"songName":@""]; self.tappedSongTitle = [BT_strings getJsonPropertyValue:thisMenuItem.jsonVars:@"songTitle":@""]; self.tappedSongURL = [BT_strings getJsonPropertyValue:thisMenuItem.jsonVars:@"songURL":@""]; //next, trigger your method that animates the UIView into place. You wrote this method somewhere... [self showSongPlayer] The showSongPlayer's job would be to load the self.tappedSongName and other values, slide in the little player, and probably disable the menu list so no other rows could be tapped.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
08/15/12 08:14 AM (11 years ago)
Thanks, ATRAIN53, I will dig into it a little more tonight when I have a chance. I am learning a ton by digging into this. (even if it is just very basic stuff) Good luck with your audio plug-in. I have big ideas for a stacked UIView setup that would allow something like multiple plugins within the same screen, or even uisplitviewcontroller with each screen being a different plug-in. Depending on your app the splitview may work to slide in and out the audio controls from the side. I have not started to dig into this yet, but once the app I am working on is done, that is my next plan. It may be more then I can handle, but I want to at least try. (too much upside not to)
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/15/12 08:45 AM (11 years ago)
No problem, hackign away at the CP JSON lately trying to give myself the ability to manage new plug-in properties. slow going and lots of trail and error - but lots of fun too learning new stuff. amazing how fast time goes however when testing. there are GREAT tutorals out there on ipad splitview. i've got a basic split view controller ready for the market. just need to test it on a real ipad and put it in an app. biggest issue i have is prying the thing away from the wife to provision it.
 

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.