Plugin Discussions

Discussions are between the Plugin Developer and app owners. Only app owners that have installed the plugin can participate in this discussion. We enforce this to help Plugin Developers focus their time on helping app owners that support the development efforts.

pointerBack to discussions for "Buzz Carousel"
Replies: 0    Views: 92
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
01/17/13 10:28 AM (11 years ago)

Version 1.0 iPad fix

Hi guys, a small feature was accidentally omitted from the Buzz Carousel plugin. Some may have noticed that the images aren't very big on the iPad.

I have submitted an update to Susan so it should be added soon.

For those of you who have already integrated it into your source code you can make the following changes.

remove the methods
//viewForItemAtIndex with reflection... (lines 385 - 414)

and //carouselItemWidth... (lines 417 - 428)

replace them with

//viewForItemAtIndex with reflection...
-(UIView*)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(ReflectionView *)view{
[BT_debugger showIt:self:@"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];

}

[view addSubview:button];

button.image= [UIImage imageNamed:[AKAlbums objectAtIndex:index]];

if (aCarousel.vertical == 1 | aCarousel.type == iCarouselTypeWheel | aCarousel.type == iCarouselTypeInvertedWheel | aCarousel.type == iCarouselTypeInvertedRotary)
{
view.reflectionAlpha = 0;
view.reflectionScale = 0;
}else{
view.reflectionGap = [[BT_strings getJsonPropertyValue:screenData.jsonVars:@"AKGap":@"4"]floatValue];
view.reflectionAlpha = [[BT_strings getJsonPropertyValue:screenData.jsonVars:@"AKOpacity":@"0.5"]floatValue];
view.reflectionScale = [[BT_strings getJsonPropertyValue:screenData.jsonVars:@"AKScale":@"0.5"]floatValue];
}

[view update];

return view;
}




///// and /////

//carouselItemWidth...
-(CGFloat)carouselItemWidth:(iCarousel *)carousel{
//[BT_debugger showIt:self:@"carouselItemWidth"];

//This needs to be wider than the image or the items have no space between them.
//That might be a desirable effect in some instances.

int imagewidth;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
imagewidth = [[BT_strings getJsonPropertyValue:self.screenData.jsonVars:@"iCarouselImageWidth":@"200"]intValue];
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
imagewidth = ([[BT_strings getJsonPropertyValue:self.screenData.jsonVars:@"iCarouselImageWidth":@"200"]intValue]*2);
}
return imagewidth;

}
 

You cannot participate in this discussion yet.

  1. You must be logged in to participate
  2. You must have a screen name setup in your profile
  3. You must have installed the plugin in your control panel.