Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 25    Views: 123

mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
11/17/12 03:52 PM (13 years ago)

Menu with Image question

Hey all, Removed the old BTM Advanced Simple Menu List in favor of Susan's Menu with Image plugin, however, may have run into a problem! It looks like the header image is REQUIRED, if a user simply wants to just use the list with icons and second line descriptions, it is not possible without a header image. Unless I am missing a setting somewhere? Any help would be appreciated, I don't want to go hacking at something that I may just be missing something easy! EDIT: tried a 1x1 transparent image, but still a huge width, guessing there are no settings to modify the header image size either? Cheers! David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 04:04 PM (13 years ago)
have you tried making a 1px high x full-length wide transparent img?
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 04:18 PM (13 years ago)
Hey Chris, yup tried, no effect, I'm messing around with WB_screen_menuImage.m with no luck so far. If I manage to get rid of the header image by hacking source code, I wont be able to update the app later with a header image by control panel - that's why I was seeking some kind of option in the control panel :( Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 04:27 PM (13 years ago)
Unless you could change the source code to match the actual image size rather than a calculation. I seem to remember trying that, though, with the icon files to see if I could make an entire row item an image. I didn't work, though, due to the resizing that occurs when the device gets rotated. I think I was able to accomplish it if I wanted to go with an iPhone only app that couldn't rotate, but I wasn't willing to do that so I changed design plans. So what happens when you insert the 1x1536 transparent png?
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 04:32 PM (13 years ago)
Thanks Chris for helping, I figured it out! :) ** What I did was (iOS VERSION PART ONLY): Step 1: open WB_screen_menuImage.m in xcode. Step 2: Search for both: imageHeight = 360 and imageHeight = 150 Step 3: Change both values to 5. This will reduce the size of the header image to almost null, making this menu list back to "normal" without a header image, but icons and second line will still work. NOTE: THIS MODIFICATION IS NOT SUPPORTED AND ONCE COMPLETED YOU WILL NOT BE ABLE TO CHANGE YOUR MIND AND ADD A HEADER IMAGE FROM THE CONTROL PANEL! David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 04:37 PM (13 years ago)
I wonder what would happen if you took out the imageHeight and kept the imageWidth where it is, and then inserted a 1x360 image? If that worked, you could always add a header image in later, assuming you created it with the correct dimensions in mind.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 04:43 PM (13 years ago)
Hmm but then theoretically you would only be able to use a header image of 1x360, you wouldn't be able to have any good image with those specifications. Unless you can directly modify the size from the control panel, you can't have both (right?) that's what I'm thinking atm. Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 04:51 PM (13 years ago)
I was thinking if you took out the height property, it would take the height from the image itself rather than the code. But the width would still be calculated at 360. Or if you need the imageHeight property for it to work, can you grab that from the actual height property of the image loaded?
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 05:38 PM (13 years ago)
I see what you mean, but I think it gathers the size directly from the code (predefined width AND height) and not the image. Otherwise that would make sense. The funny part is there is commented out code that suggests that we COULD make changes to the width and height from the control panel. But Susan must have had a reason for commenting it out and not allowing us to change it from the control panel. I PM'ed Susan for thoughts. Cheers, David https://buzztouchmods.com
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/17/12 06:53 PM (13 years ago)
Here is a link to how to change the image size. It requires that you go into the code. http://www.buzztouch.com/plugins/discussion.php?tid=7D51F0CA8FEFF3881006324&pid=F018606BDA6027B90A3ED49&searchInput=search...&sortColumn=PT.modifiedUTC&sortUpDown=DESC&currentPage=1 If you go to the discussion page for the plugin, I also included instructions about how to change the icon image size. Our world has changed since the days of buzztouch 1.5, making it a lot harder to have a simple way to set a parameter for height. I am thinking about making a small, medium, and large size for a future update.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 06:58 PM (13 years ago)
@Susan - I'm a derp! I may be able to help you code in a "yes or hide header" option and send you the code for the next update - unless you want to tackle that yourself? Thanks a lot for the help/reference! Cheers, David https://buzztouchmods.com
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/17/12 08:24 PM (13 years ago)
It is funny how buzztouch brings together people of different generations. I had no idea was a "derp" was. LOL! (At least I know that one.) @David, you are in no way a derp. You are a very helpful and intelligent young man and buzztouch is so lucky to have you. Thank you for covering for me! Adding a hide header image option is a good idea, and I will add it to my list of ideas for updates. Maybe what we want is three choices for image sizes, and then a choice for no image. I have been studying iOS--just finished a chapter a day for 21 chapters--and looking for some new iOS challenges. (Keep in mind that studying iOS is not the same as being proficient, so I may still need some help, @David.) I plan to start studying Android tomorrow, but at a bit slower pace. For my iOS quest, it took 3-5 hours per day for each chapter.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 08:28 PM (13 years ago)
Good sttategy Susan - what was your book of choice?
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/17/12 08:34 PM (13 years ago)
I highly recommend this one: http://www.amazon.com/Beginning-iOS-Development-Exploring-SDK/dp/1430236051/ref=sr_1_4?ie=UTF8&qid=1353209536&sr=8-4&keywords=ios+development The update for the book is coming out in December, so wait for that if you can. The current edition is based on Xcode 4.2. I started out with the Big Nerd Ranch book, but switched to the one above. The Big Nerd Ranch book assumes more knowledge of programming.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
11/17/12 08:38 PM (13 years ago)
Thanks!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/17/12 08:44 PM (13 years ago)
@Susan - love it! Age differences are the spice of life I think, I can't seem to get a mentally stimulating conversation with my own age peers, all they want to do around here is drink and party (college, go figure!) I enjoy your posts. Those options would be good yup, looking forward to them! If you need help, I'm one PM away. Cheers and thanks again, best of luck with your chapters! David https://buzztouchmods.com
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
11/18/12 06:09 AM (13 years ago)
Yesterday i was fiddling with the same thing @MrDavid. i changed the pixel high to 1 and was happy but later i realized another screen in my app needed the header image. it would be nice to have the option to set the header or not! in the meantime i will edit the code and upload the modified version to buzztouch/self-hosted and use the original plugin as well. @Susan - quick question about the menu buttons..i have an old 1.5 app where im using a small image and of course the plugin calls for 100 pixels. could you have an option later to set the icon size in the control panel? i found that my icon image was a bit too large in comparison of how the old app looked in 1.5. just wondering if it could be something that i could be added at a later date! thanks!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
11/18/12 09:21 AM (13 years ago)
I recall editing the .xml file. There is something hard coded in there for a 150px image header height IIRC. Not in from of Eclipse today. Something else I have done, esp to the BTM Advanced menu under ios, if i want to use a customized version of it in my app but still keep the original plug-in... Duplicate the plug-in! Only a few files you need to mod to load it up on Self Hosted. Then you can have a 'headerless' version of it.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/18/12 10:21 AM (13 years ago)
@mysps, are they enlarged like this? https://www.buzztouchmods.com/downloads.php?cat_id=2&download_id=4 http://postimage.org/image/r7in6j961/ I figured out a small code change in that fixes this in susans plugin. Cheers, David https://buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/18/12 10:22 AM (13 years ago)
@ATRAIN... duplicate... not a bad idea! David https://buzztouchmods.com
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
11/18/12 11:04 AM (13 years ago)
MrDavid. i dont have a problem with menu buttons. just the list menu icons being large. i can try to do a screenshot when im on a mac. thanks i agree with the duplicate, thats what i mentioned before. i hope there is no problem doing that for paid plugins..
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/18/12 11:10 AM (13 years ago)
Yup that's what I meant, it's the same code (buttons and list), watch:, open that plugin your having issue with and find: setContentMode:UIViewContentModeScaleAspectFill ^ that stretches the icons to full width CHANGE TO: setContentMode:UIViewContentModeCenter this simply centers whatever you have. so if the icon is 25x25 it will center within the 100x100 space as it used to in 1.5 Hope that helps! David https://buzztouchmods.com
 
cajujoe
I hate code!
Profile
Posts: 24
Reg: Nov 15, 2011
Rio de Janeiro
4,090
like
11/18/12 11:26 AM (13 years ago)
I´m using the Menu with Image too, and wanted only the icons on the rows in some screens. It´ll be nice if we had the option to disable the header on some screens without entering into code.
 
Mackimack
Apple Fan
Profile
Posts: 481
Reg: Dec 30, 2010
Sweden
14,310
like
11/18/12 11:50 PM (13 years ago)
@SusanMetoxen The iOS 5 book you reading is it good? Is it worth buying?
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
11/19/12 07:06 AM (13 years ago)
It is excellent, but a lot of work to get through. After going through it,I feel like I have a comprehensive understanding of iOS. There is still a lot to learn, but now I have a framework.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
11/19/12 01:12 PM (13 years ago)
Checking it out :) David https://buzztouchmods.com
 

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.