Custom iCarousel for Iphone?

In my application, I want to implement iCarousel to display view controllers, as shown in the figure below, I went through many tutorials and links, but I did not receive my request, help me enter image description here

+6
source share
4 answers

It is known as coverflow in iOS. Follow this link , you will get what you want and learn how to implement it.

Or you can refer to this stack overflow question . and now I received an answer from my

+5
source

You can use iCarousel for the same effect.

from the link below download the sample code for the carousel effect. https://github.com/nicklockwood/iCarousel

There is one example in the No Nib folder.

Open it and change the following code according to your requirement

// in iCarouselExampleViewController.m

In the method below, change the code there to suit your needs. By adding various user interfaces on the main screen, you can design the desired user interface.

In my case, I added one image and a label on this main view.

- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view { UILabel *label = nil; UIImageView *imageLogo=nil; UIImageView *imageBack=nil; //create new view if no view is available for recycling if (view == nil) { view = [[[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"page1" ofType:@"png"]]] autorelease]; imageBack=[[[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"3" ofType:@"png"]]] autorelease]; imageBack.frame=CGRectMake(70, 70,388, 49); [view addSubview:imageBack]; label = [[UILabel alloc]initWithFrame:CGRectMake(80, 78, 380, 30)]; label.backgroundColor=[UIColor darkGrayColor]; label.font = [label.font fontWithSize:20]; label.backgroundColor=[UIColor clearColor]; [view addSubview:label]; imageLogo=[[[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Map" ofType:@"png"]]] autorelease]; imageLogo.frame=CGRectMake(25, 70, 50, 49); [view addSubview:imageLogo]; } else { label = [[view subviews] lastObject]; } label.text = @"Some text"; label.frame=CGRectMake(label.frame.origin.x, label.frame.origin.y, label.frame.size.width,label.frame.size.height); return view; } } 
+2
source

iCarousel is used to display views, not to view controllers.

There is no need to have an array of view controllers for what you are trying to do, because all your looks behave the same way you can put your control logic in one view controller that controls the carousels and has any buttons in your carousel that see call methods on your the main view controller, using the index of the item to determine which carousel item was clicked.

There are several examples in iCarousel that show how to do this, including an example of controls that shows how to load individual carousel views from a nib file and attach their actions to the main view controller.

+2
source

Try iCarousel for iOS, it’s the best way to use lightweight, more carousel effects like vertical and horizontal. Below are links for a download and implementation tutorial.

ICarousel demo project under the link:

https://github.com/nicklockwood/iCarousel

iCarousel for horizontal scrolling from the link below:

http://haifa.baluyos.net/index.php?option=com_content&view=article&id=60:objective-c-image-carousel-tutorial&catid=1:programming&Itemid=5

+1
source

All Articles