2011-03-18 47 views
0

我做了段控制。iPhone中的UISegmentedControl導航問題

在存在三個段..

現在我已經使用其中當我選擇不同segments..different數據的單個表相應地出現在該表中的行..

現在我問題...

當我選擇段1 ...它應該導航到FirstViewController ......當我從出現表

選擇排在我選擇段2 ...它應該定位到SecondViewController ...當我選擇從出現表

當我選擇段第3行...它應該導航到ThirdViewController ......當我從出現表中選擇行

其中FirstViewController,SecondViewController,ThirdViewController簡單viewControllers一些圖片

如何做到這一點?

+0

「特定視圖1」 - 哪一個特定視圖?你需要澄清你的問題。 – occulus 2011-03-18 12:31:27

+0

編輯:) ....... – 2011-03-18 12:39:25

回答

1

完成..

我did..I沒有存儲其中分段控制被選擇的值..

然後根據所選擇的段控制在..我行所作的開關殼體做選擇..

rathodrc

+0

rathodrc:偉大的工作bhai .. !! :-) :-)。 – 2011-03-18 16:57:28

+0

你在哪裏工作?在艾哈邁達巴德? – 2011-03-18 16:58:21

+0

@ Parth..hehe ... bhai..boy已經學會了..男孩在Ahmedab​​ad學到了..yeah ..而你呢?巴羅達? – 2011-03-19 04:29:15

0

在你的tableview委託方法

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath 

使用segmentcontrol.selectedSegmentIndex檢查段控制的選定索引。根據這個推動任何您需要的視圖控制器。