Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 71

GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
04/01/13 05:35 AM (12 years ago)

iCarousel button height issue

Hi all, I'm having this button height issue with iCarousel plugin. I would like to use buttons that are almost full screen (using the linear option it scrolls like pages from left to right which is pretty nice). I now know how to adjust the width, found that in another topic. But please can anyone explain to me how to adjust the button height as well. The bottom of the button starts at approx. 1/3 at the bottom of the screen because of the reflection, thats cool!! But the top of the button tops at apprx. 2/3 of the screen height and I would like to stop it at let's say 3/4 of the screen height. I'm not a native english speaker as you already noticed so I hope I made myself clear ;-) This is a sample where you can see wat I mean. The head of the figure should be more to the top. http://www.gjvanwijk.nl/sample.png Thx in advance. Regards, Gert-Jan
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
04/01/13 06:05 AM (12 years ago)
I think its in the Buzz_carusel.m, trial and error. I think you will see buttons that have values of 200. Look for: //return a standard UIImageView object with the image from the array of images... Its near the bottom of the file.
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
04/01/13 06:10 AM (12 years ago)
Ok thx I'll have a look and let you know.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
04/01/13 06:13 AM (12 years ago)
Hi Gert, No need to change code in the file I guess you are asking how to lift the image slightly go to Control where the center of the carousel is on the 'y' axis its towards the bottom of iCarousel Layout and Options in the control panel options if you put -50 it will lift the carousel by 50 pixels Have a play around https://dl.dropbox.com/u/16651980/changey.png
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
04/01/13 06:39 AM (12 years ago)
sorry, my bad, didn't read the post properly.
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
04/01/13 06:44 AM (12 years ago)
Great guys, thx the both of you!!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
04/01/13 06:45 AM (12 years ago)
thankyou for buying the plugin goodluck in your app endeavours
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
04/01/13 06:49 AM (12 years ago)
Moving it to the top works fine thx Still have a question ;-) I want to use a button image file which is 150wx300h and constrain proportions. How do i manage that because right now the image is squeezed a bit. Thx again
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
04/01/13 06:57 AM (12 years ago)
Go to line 385 in Buzz_carousel.m //viewForItemAtIndex with reflection... -(UIView*)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(ReflectionView *)view{ [BT_debugger showIt:self theMessage:@"viewForItemAtIndex"]; UIImageView *button; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { //return a standard UIImageView object with the image from the array of images... view = [[[ReflectionView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 200.0f, 200.0f)] autorelease]; button = [[[UIImageView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, 200.0f, 200.0f)] autorelease]; }else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ //return a standard UIImageView object with the image from the array of images... view = [[[ReflectionView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 400.0f, 400.0f)] autorelease]; button = [[[UIImageView alloc]initWithFrame:CGRectMake(0.0f, 0.0f, 400.0f, 400.0f)] autorelease]; } where it has the values (0.0f, 0.0f, 200.0f, 200.0f) change to (0.0f, 0.0f, 150.0f, 300.0f) and fot the ipad version (0.0f, 0.0f, 400.0f, 400.0f) to (0.0f, 0.0f, 300.0f, 600.0f) there are two sets of each one controls the reflection so make sure to change them both
 
GJvanWijk
I hate code!
Profile
Posts: 95
Reg: Dec 19, 2011
location unknow...
6,000
like
04/01/13 06:59 AM (12 years ago)
Ah great that did the tric Thanks so much!!!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
04/01/13 07:00 AM (12 years ago)
No probs
 

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.