簡體   English   中英

故事板到筆尖

[英]Storyboard to a nib

我在UITableView中有一個RSS解析器,當選擇了其中一行時,它會推送到詳細信息視圖。 我可以在使用Nib文件的舊UI格式下正常工作,但我想將所有內容傳輸到UIStoryboard 我了解到UIStoryboardsnibs是兼容的,所以我決定保留相同的代碼,但是將UITableView放在UIStoryboard ,並將詳細信息視圖作為自己的筆尖。 我把所有東西都連接起來,它應該可以正常工作,它沒有給我任何錯誤,但是沒有給我任何錯誤。 有什么我想念的東西嗎,或者故事板和筆尖根本不兼容。

編輯:

- (id)initWithItem:(NSDictionary *)theItem {
    if (self == [super initWithNibName:@"RssDetailController" bundle:nil]) {
        self.item = theItem;
        self.title = [item objectForKey:@"title"];
    }

    return self;
}

您是從UIStoryboardUIViewController推送到NIB文件嗎?

如果是這樣,請查看從情節NIB推送到NIB 示例項目

// in a navigation controller

// to load/push to new controller use this code

// this will be next screen
DetailsViewController *detailsViewController = [[DetailsViewController alloc ]init];
[self.navigationController pushViewController:detailsViewController animated:YES];


// to go back or pop controller use this
// now it will send back to parent screen
[self.navigationController popViewControllerAnimated:YES];

暫無
暫無

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

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