我的問題是,splitViewController的列表視圖中會彈出時,每當我試着使用滑塊。我解決了這個問題,通過在的appDelegate presentWithGesture設置爲NO,像這樣:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
UISplitViewController *splitViewController = (UISplitViewController *)self.window.rootViewController;
UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
splitViewController.delegate = (id)navigationController.topViewController;
splitViewController.presentsWithGesture = NO;
}
return YES;
}
重讀,你的問題似乎是相反的:你希望splitViewController對揮筆迴應,但不是滑塊。由於UISlider是UIResponder的一個子類,所以我認爲你最好的選擇就是看那裏。很有可能壓倒一切可以執行行動:withSender:總是返回NO將解決您的問題。
好的,我找到了一個解決方法: yourSplitviewController.presentsWithGesture = NO; 但我實際上只想禁用UISlider的刷卡...我提交了一個錯誤報告。到目前爲止,似乎沒有辦法做到這一點?! – wolfrevo 2012-03-12 16:23:27