我有一个tableview在我的应用程序中显示设备列表.当调用viewWillAppear时,我添加了self.searchDisplayController.searchBar as a subview to a headerView.然后我分配self.tableView.tableHeaderView = headerView.它看起来像这样:

我向下滚动tableview,以便headerview不在视图中,然后通过点击单元格转到其他视图控制器.当我回到这个tableView时,向上滚动到headerView,searchBar变得不可见,但是在点击不可见区域时,searchDisplayController被激活并且取消按钮不起作用.这仅适用于iOS 7.为什么会这样?
注意:当我回到tableViewController时,只有当headerView不在视图中时才会发生.
我有,working iOS application
为了support iOS8,我正在取代UIAlertView/UIActionSheet with
UIAlertController.
问题:
为了显示UIAlertController,我需要UIViewController类的presentViewController方法.
但是 UIAlertView中是从哪个是类显示器inherited的
UIView or NSObject,
我不能[self presentViewController...]为明显的原因的方法.
我的工作:
我尝试获取rootViewController表单当前窗口并显示UIAlertController.
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController ...]
Run Code Online (Sandbox Code Playgroud)
但有一些旋转问题,如果我的当前视图控制器没有旋转支持,它将旋转,如果UIAlertController打开.
问题:
有没有人遇到同样的问题并且有安全的解决方案?
如果是,请给我一些例子或给一些指导
objective-c uialertview uiactionsheet ios8 uialertcontroller
我正在使用UIAlertController.但是在iOS 8的iPad上,actionSheet显示了弹出式箭头.任何隐藏箭头的想法?
这是我的代码:
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller" message:@"yeah" preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action)
{
NSLog(@"Cancel action");
}];
UIAlertAction *okAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"OK", @"OK action")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action)
{
NSLog(@"OK action");
}];
UIAlertAction *deleteAction = [UIAlertAction
actionWithTitle:NSLocalizedString(@"Delete", @"Delete action")
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *action) {
NSLog(@"Delete action");
}];
[alertController addAction:cancelAction];
[alertController addAction:okAction];
[alertController addAction:deleteAction];
UIPopoverPresentationController *popover = alertController.popoverPresentationController;
if (popover) {
popover.sourceView = self.view;
popover.sourceRect = self.view.bounds;
popover.permittedArrowDirections = UIPopoverArrowDirectionUnknown;
} …Run Code Online (Sandbox Code Playgroud) uiactionsheet ipad uipopovercontroller ios8 uialertcontroller
我的应用程序使用相机.在iOS8中,它们包含一个新的隐私设置,Camera用户可以在其中管理每个应用程序的相机权限.
问题:
如果用户不允许我的应用程序使用相机,那么我怎么知道我的应用程序无法访问相机.
就像我可以ALAssetsLibrary authorizationStatus用来发现photolibrary的状态或ABAddressBookGetAuthorizationStatus了解电话簿访问的状态.
问题:
如何知道我的应用程序是否在iOS8中具有相机访问权限,以便我可以提示用户允许相机访问我的应用程序?
我有照片展位的下面打印屏幕,与我的应用程序有相同的问题.



我有英文,日文,韩文Localizable.strings文件.我无法从韩国文件中加载一些单词.我也检查过拼写,大写字母或小写字母.它是正确的.我已清理项目,重置模拟器并删除设备上的应用程序.对某些词语不起作用.我可以知道该怎么办吗?
我有工作项目,我在UIWebView中显示pdf文件在使用XCode5
在iOS8beta5中测试我的应用程序时,它无法正常工作
在日志中显示failed to find PDF header : '%PDF' not found
self.myWebView.delegate = self;
NSString *path = [[NSBundle mainBundle] pathForResource:@"201" ofType:@"pdf"];
NSURL *targetURL = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
[self.myWebView loadRequest:request];
Run Code Online (Sandbox Code Playgroud)
Quicklook framework may did not display PDF file in some application
但他们没有提到任何关于UIWebView,
我有如下的视图结构.
HomeView(Support only portrait mode)
|
|
V
View1(Support all orientation)
|
|
V
View2(Support all orientation)
Run Code Online (Sandbox Code Playgroud)
问题:
当我coming back from View2(Landscape mode)要HomeView调用popToRootViewController的方法,它没有调用supportedInterfaceOrientationsForWindow的方法App_Delegate并显示
在HomeViewlandscape mode.
图片:

注意:
当我从View1(横向模式)返回到HomeView时,通过调用popToRootViewController方法调用supportedInterfaceOrientationsForWindow并且所有工作都很好,同样的事情不会发生.
如果我在iOS7中使用XCode6运行app,一切都很棒.
I read below question but it did not help me.
解雇模态视图控制器时如何保持显示视图控制器的方向?
在上面的链接matt说iOS8 stop support for friezing orientation,但我没有找到它,apple document
如果你有任何reference link关于这个改变请分享.
问题:
1]为什么委托方法supportedInterfaceOrientationsForWindow不调用.
2]是否可以使一个视图具有支持单一方向,而所有其他视图将支持所有方向.
谢谢
我注意到iOS 7 a **UIActionSheet** automatically dismisses了user taps anywhere on the screen on an **iPhone**.这不是iOS 6中的情况,并且导致意想不到的效果.Is this a UI change? Bug? Is there a way to disable this?
来自iOS 7文档:
"如iOS人机界面指南中所述,您应该在iPhone上显示一个带有操作表的取消按钮,并在iPad上通过打开的弹出窗口显示这些操作页.否则,在iPad上,操作表会显示在弹出窗口中,并且用户可以通过点击弹出窗口外部取消操作表,在这种情况下,您不需要包含"取消"按钮."
这似乎表明,当点击操作表外的任何地方时,解雇的行为应仅适用于iPad.但现在这种情况发生在运行iOS 7的iPhone上,而不是在运行iOS 6的iPhone上运行
我有iOS7及以下的工作应用程序
我使用UISearchDisplayController进行表格搜索.
问题:
iOS8中未显示搜索标题视图后.
如下图所示.
搜索之前:

搜索后:

我在TPSMastreViewController.m中添加以下代码
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *v = [[UIView alloc] init];
v.backgroundColor = [UIColor greenColor];
return v;
}
Run Code Online (Sandbox Code Playgroud)
我有一些代码,只需点击按钮即可显示UIActionSheet.但是当我在iPad中使用XCode5.1 + iOS8beta构建它时它会崩溃.
下面是我用来显示UIActionSheet的代码.
UIActionSheet *tmpActionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:
@"Ok",
nil];
[tmpActionSheet showInView:self.view];
Run Code Online (Sandbox Code Playgroud)
注意:
- 它完全适用于XCode6beta + iOS8beta(iPhone/iPad)
- 完美适用于XCode5.1 + iOS8beta(仅适用于iPhone)
异常的日志记录如下.
2014-06-23 15:54:04.860 ActionSheetDemo[680:191598] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and …Run Code Online (Sandbox Code Playgroud) 我想将变量设置为这样的计算时间
(setf a (time (+ 1 1)))
Run Code Online (Sandbox Code Playgroud)
但不是时间我得到这个
Break 1 [7]> a
2
Run Code Online (Sandbox Code Playgroud)
如何设置计算时间?
ios8 ×7
xcode6 ×4
objective-c ×3
ios7 ×2
ipad ×2
iphone ×2
xcode5 ×2
camera ×1
cocoa ×1
common-lisp ×1
ios ×1
orientation ×1
uialertview ×1
uisearchbar ×1
uitableview ×1
uiwebview ×1
xcode ×1