各ボタンのタップを検出できますが、各ビューに必要なビューを読み込んで表示する方法
それらは 1 回読み込まれ、UISegmentedView の ID のタップ時に表示される必要があります。
複数ページの編集保存状況です。
各ボタンのタップを検出できますが、各ビューに必要なビューを読み込んで表示する方法
それらは 1 回読み込まれ、UISegmentedView の ID のタップ時に表示される必要があります。
複数ページの編集保存状況です。
UISegmentedControl オブジェクトの selectedSegmentIndex プロパティを使用します。
if (segmentedControl.selectedSegmentIndex == 0) {
NSLog(@"segment 1");
if (view1 == NULL) {
view1 = [[UIViewController alloc] init];
[self.view addSubview:view1.view];
}
else {
[self.view bringSubviewToFront:view1.view];
}
}
else {
NSLog(@"segment 2");
if (view2 == NULL) {
view2 = [[UIViewController alloc] init];
[self.view addSubview:view2.view];
}
else {
[self.view bringSubviewToFront:view2.view];
}
}