2012-06-22 22 views
0

想知道是否有人知道如何實現底部工具欄中的箭頭,如下所示?如果有人能夠讓我對此有所瞭解,將會非常感激。我看過很多帶有箭頭的應用程序來瀏覽頁面,並且似乎無法在XCode中找到它們。見下文......iOS應用程序工具欄底部的箭頭

THX :)

enter image description here

回答

1

只需設置一個UIToolbar並將其安裝這兩個圖像(我給你兩個圖像標準和視網膜存檔鏈接):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]; 

你完成了!

+0

你自己做了這些嗎? – Masterminder

+0

我從開放源碼的iOS GUI中取得了它們。 – Phillip

+0

感謝哥們!非常感謝。 – Masterminder

0

我猜這些箭頭進行定製,而蘋果Safari瀏覽器,圖片庫等製成
我覺得你可以讓那些在油漆如果你沒有沿着Photoshop的東西。