Question

Was wondering if anyone knew how to implement arrows in the bottom toolbar as shown below? Would be extremely grateful if someone could give me insight into this. I have seen a lot of apps with such arrows to navigate through pages and cannot seem to find them in XCode. See below...

THX :)

enter image description here

Was it helpful?

Solution

Just set a UIToolbar and attach it those two images (i'll give you the archive link with both images standard and retina): link

//Creating UIToolbar
    toolBar = [[UIToolbar alloc]init];
    toolBar.frame = CGRectMake(//set some frame);
    toolBar.barStyle = UIBarStyleBlackOpaque;
    [toolBar sizeToFit]; 

    //Creating buttons
    UIBarButtonItem *prev = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"previous.png"] style:UIBarButtonItemStylePlain target:self action:@selector(myaction:)] autorelease]; 
UIBarButtonItem *next = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"next.png"] style:UIBarButtonItemStylePlain target:self action:@selector(myaction:)] autorelease]; 

     //Creating the array with the buttons
     NSArray *items = [NSArray arrayWithObjects:prev,next, nil];

//Assigning the array to the toolbar
[toolBar setItems:items];
    [self.view addSubview:toolBar];
    [toolBar release]; 

You are done!

OTHER TIPS

I'm guessing those arrows were custom made by Apple for Safari, Photo Library, etc.
I think you can make those in Paint if you don't have something along the lines of Photoshop.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top