0

以下に示すように、下部のツールバーに矢印を実装する方法を誰かが知っているかどうか疑問に思っていましたか?誰かが私にこれについての洞察を与えることができれば非常にありがたいです。ページをナビゲートするためのこのような矢印の付いたアプリをたくさん見ましたが、XCodeでそれらを見つけることができないようです。下記参照...

THX :)

ここに画像の説明を入力してください

4

2 に答える 2

1

UIToolbarを設定し、それらの2つの画像を添付するだけです(標準画像と網膜画像の両方を含むアーカイブリンクを提供します):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]; 

これで完了です。

于 2012-06-22T18:15:39.770 に答える
0

これらの矢印は、AppleがSafariやPhoto Libraryなどのためにカスタムメイドしたもの
だと思います。Photoshopのラインに沿ったものがなければ、Paintで作成できると思います。

于 2012-06-22T18:08:09.317 に答える