使用以下:
[self.actionSheetPostOptions showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];
Run Code Online (Sandbox Code Playgroud)
也试过了
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil
message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *actnCamera = [UIAlertAction actionWithTitle:@"Camera" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
}];
UIAlertAction *actnLibrary = [UIAlertAction actionWithTitle:@"Library" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
}];
[alertController addAction:actnLibrary];
[alertController addAction:actnCamera];
[alertController setModalPresentationStyle:UIModalPresentationPopover];
UIPopoverPresentationController *popPresenter = [alertController
popoverPresentationController];
popPresenter.barButtonItem = self.navigationItem.rightBarButtonItem;
[self presentViewController:alertController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
但在解雇时仍然遇到同样的问题.
更新iOS 11:iOS 11中不再存在此问题.
我的应用有自定义UITableView.在它的cellForRowAtIndexPath委托方法中,UIViewController我实例化UITableViewCell包含多个自定义UILabel(实际上是子类OHAttributedLabel)的自定义对象作为内容视图的子视图.
我尝试userInteractionEnabled = YES在标签上设置,然后在视图控制器中添加触摸事件,但这不起作用.
想法?
谢谢
在我的项目中,我正在使用页面动画.我的问题是我想在卷曲视图的背景上显示红色.我如何实现这一目标?提前致谢.

CATransition *animation = [CATransition animation];
[animation setDelegate:self]; [animation setDuration:0.75];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
animation.type = @"pageUnCurl";
animation.fillMode = kCAFillModeBackwards;
animation.startProgress = 0.65;
[animation setRemovedOnCompletion:NO];
[[self view] exchangeSubviewAtIndex:[self.view.subviews count]-2 withSubviewAtIndex:3];
[[self view] exchangeSubviewAtIndex:[self.view.subviews count]-3 withSubviewAtIndex:2];
[[[self view] layer] addAnimation:animation forKey:@"pageCurlAnimation"];
Run Code Online (Sandbox Code Playgroud)
这就是我改变观点的方式.
目前,我的应用程序采用xxx格式,但现在通过下一个版本我们想让它的版本格式为xxxx现在在itunesconnect中用xxxx创建了一个版本,但问题是在上传构建到apple时它给出了一个错误" info.plist文件中的密钥CFBundleShortVersionString'xxxx'必须是一个以句点分隔的列表,最多包含三个非负整数."
我在appstore中看到很多带有'xxxx'格式的应用程序.但为什么他们不允许?他们(苹果)最近改变了什么吗?
我的视图控制器是一个UIViewController.我加入UITableView了UIView.选择tableview行时,push segue将触发一个新的视图控制器.但是,从新视图控制器返回时,所选行保持选中状态.当我的第一个控制器是一个时UITableviewController,我没有遇到这个问题,但是我不得不把它改成一个UIViewController,因为我想在我的视图中添加活动指示器.我注意到的另一件事是,当我的第一个控制器是UITableviewController,viewDidLoad在新的视图控制器来当回(但现在它的称呼)不叫.
ios ×3
iphone ×3
objective-c ×3
app-store ×1
cocoa-touch ×1
ios9 ×1
itunes ×1
itunes-store ×1
segue ×1
uitableview ×1
xcode ×1