久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將序列 ios5 故事板 uitableview 中的數(shù)據(jù)傳遞到

How pass data in seque ios5 storyboard uitableview to detail view(如何將序列 ios5 故事板 uitableview 中的數(shù)據(jù)傳遞到詳細視圖)
本文介紹了如何將序列 ios5 故事板 uitableview 中的數(shù)據(jù)傳遞到詳細視圖的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我正在使用故事板在 ios5 中創(chuàng)建一個應用程序.我在導航控制器中嵌入了一個 tableviewcontroller,當您單擊 tableviewcontroller 中的單元格時,應將有關該單元格主題的一些詳細信息傳遞給詳細信息視圖.我使用 plist 來填充表格視圖和詳細信息視圖.我在不使用情節(jié)提要的情況下做得很好,但想學習如何使用情節(jié)提要.我已經(jīng)從 tableviewcontroller 轉到我的詳細視圖.

I'm creating an app in ios5 using storyboards. I have a tableviewcontroller embedded in a navigation controller and when you click on the cells in the tableviewcontroller some detail about that cell topic should be passed to a detail view. I use a plist to populate the tableview and the detail view. I've done this fine without using storyboard but want to learn how to use storyboard. I have seque going to my detail view from the tableviewcontroller.

我的序列代碼是:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"DetailViewControllerSeque"])
    {   DetailViewController *detailViewController = [segue destinationViewController];  
        NSString *path = [[NSBundle mainBundle] bundlePath];
        NSString *finalPath = [path stringByAppendingPathComponent:@"questList.plist"];
        NSArray *tempArray = [finalPath valueForKey:@"description"];
        NSString *descriptionString = [tempArray valueForKey:@"description"];
        detailViewController.detailDescriptionText.text = descriptionString;    
    }
}

感謝您的幫助.

推薦答案

我遇到了同樣的問題(由于缺乏 iOS5 經(jīng)驗).

I was having the same problem (from lack of experience with iOS5).

事實證明,這是一個帶有 iOS5 SDK 的示例應用程序,它有一個表格視圖,當點擊表格單元格時使用 segues:Simple Drill Down".

It turns out that is an example app with the iOS5 SDK which has a table view that uses segues when a table cell is tapped : "Simple Drill Down".

https://web.archive.org/web/20130513140140/http://developer.apple.com:80/library/ios/#samplecode/SimpleDrillDown/Introduction/Intro.html

您確實在表格單元格處設置了轉場,并在情節(jié)提要文件中為其命名.

You do set the segue at the table cell and give it a name in the storyboard file.

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

    /*
     When a row is selected, the segue creates the detail view controller as the destination.
     Set the detail view controller's detail item to the item associated with the selected row.
     */
    if ([[segue identifier] isEqualToString:@"ShowSelectedPlay"]) {

        NSIndexPath *selectedRowIndex = [self.tableView indexPathForSelectedRow];
        DetailViewController *detailViewController = [segue destinationViewController];
        detailViewController.play = [dataController objectInListAtIndex:selectedRowIndex.row];
    }
}

這篇關于如何將序列 ios5 故事板 uitableview 中的數(shù)據(jù)傳遞到詳細視圖的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標成員身份可見性)
UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合單元格表視圖靜態(tài)和動態(tài)單元格中處理單元格選擇)
How to remove Address Bar in Safari in iOS?(如何在 iOS 中刪除 Safari 中的地址欄?)
iOS 5 SDK is gone after upgrade to Xcode 4.5(升級到 Xcode 4.5 后,iOS 5 SDK 消失了)
Having trouble creating UIImage from CIImage in iOS5(在 iOS5 中從 CIImage 創(chuàng)建 UIImage 時遇到問題)
Open target=quot;_blankquot; links outside of UIWebView in Safari(打開目標=“_blank;Safari 中 UIWebView 之外的鏈接)
主站蜘蛛池模板: 久久久久一区 | 欧美另类日韩 | 日韩毛片中文字幕 | 亚洲视频免费在线播放 | 99久久免费精品国产男女高不卡 | 毛片入口 | 欧美国产视频 | 午夜精品久久久久久久久久久久 | 国产毛片毛片 | 免费特黄视频 | 麻豆va | 欧美成人a| 午夜伦理影院 | 另类专区成人 | 在线看91| 精品一区二区三区免费视频 | 日韩欧美第一页 | 99re在线| 天天久久 | 成人免费观看男女羞羞视频 | 成年人的视频免费观看 | 日韩视频精品 | 久久久国产精品视频 | 亚洲电影一区 | 国产精品呻吟久久av凹凸 | 国产精品美女在线观看 | 精品欧美一区二区精品久久久 | 久久精品国产一区二区电影 | 在线高清免费观看视频 | 亚洲三区在线观看 | 亚洲精品一 | 国产精品久久久久久二区 | 91视频进入| 欧美乱码精品一区二区三区 | 欧美精品久久久久久久久久 | 久久久久久亚洲精品 | 国产一区二区三区久久久久久久久 | 天天操夜夜艹 | 国产精品av久久久久久毛片 | 久久人人网 | 国产一级免费视频 |