簡體   English   中英

如何單擊iphone應用程序中的按鈕並鏈接到應用程序中的第二頁

[英]how to click on a button in the iphone application and link to a second page within the app

我正在建立一個沒有導航欄的基於視圖的項目。 我有2頁。 只需一個按鈕即可從第一頁鏈接到第二頁。 然后是一個按鈕,用於從第二頁鏈接到第一頁。 似乎應該很簡單,但我有一段時間想得到它。

- (IBAction) view2ButtonPressed: (id) sender {
    View2Controller *vc = [[View2Controller alloc] initWithNibName:@"View2" bundle:nil];
    [self.navigationController pushViewController:vc animated:YES];
}

然后將按鈕的touchedUp操作鏈接到view2ButtonPressed方法。 (確保同時在.h文件中列出該方法)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM