Print? // Click the homepage button to bring up the settingPageController window. The homepage is self. view.
// Click the homepage button to bring up the settingPageController window. The homepage is self. view.
[Cpp]
// This is the click implementation function of the button on the home page.
-(IBAction) button_touch :( id) sender {
// SettingPage is a newViewController initialized here
SettingPage * setting_page = [[settingPage alloc] initWithNibName: @ "settingPage" bundle: nil];
// Set the rootViewController of settingPageViewController to UINavigationController (which can be set as needed)
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: setting_page];
// Set leftBarButton as the completion button
UIBarButtonItem * barButton = [[UIBarButtonItem alloc] initWithTitle: @ "done"
Style: UIBarButtonItemStyleDone
Target: self action: @ selector (achieving :)];
Setting_page.navigationItem.leftBarButtonItem = barButton;
Nav. modalInPopover = NO;
Nav. modalPresentationStyle = UIModalPresentationFormSheet;
[Self presentModalViewController: nav animated: YES];
Nav. view. superview. center = CGPointMake (500,400); // you can specify the midpoint coordinates.
[Setting_page.navigationController.navigationBar setBackgroundImage: [UIImage imageNamed: @ "toubar.png"] forBarMetrics: UIBarMetricsDefault];
Setting_page.navigationItem.title = @ "set ";
[Setting_page release];
[BarButton release];
[Nav release];
}
// This is the click implementation function of the button on the home page.
-(IBAction) button_touch :( id) sender {
// SettingPage is a newViewController initialized here
SettingPage * setting_page = [[settingPage alloc] initWithNibName: @ "settingPage" bundle: nil];
// Set the rootViewController of settingPageViewController to UINavigationController (which can be set as needed)
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: setting_page];
// Set leftBarButton as the completion button
UIBarButtonItem * barButton = [[UIBarButtonItem alloc] initWithTitle: @ "done"
Style: UIBarButtonItemStyleDone
Target: self action: @ selector (achieving :)];
Setting_page.navigationItem.leftBarButtonItem = barButton;
Nav. modalInPopover = NO;
Nav. modalPresentationStyle = UIModalPresentationFormSheet;
[Self presentModalViewController: nav animated: YES];
Nav. view. superview. center = CGPointMake (500,400); // you can specify the midpoint coordinates.
[Setting_page.navigationController.navigationBar setBackgroundImage: [UIImage imageNamed: @ "toubar.png"] forBarMetrics: UIBarMetricsDefault];
Setting_page.navigationItem.title = @ "set ";
[Setting_page release];
[BarButton release];
[Nav release];
}
[Cpp]
// Complete the return key
-(IBAction) achieving :( id) sender {
[Self dismissModalViewControllerAnimated: YES];
}