我试图修改UIPickerView曲率看起来像iOS 7计时器.
这是我有的:
注意2和4如何与所选行中的3显着偏移.有没有办法让它变得更"扁平",在iOS7中是一个定时器,其中2和4直接位于3的上方和下方?
这是我到目前为止所尝试的:
玩弄 - (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component
使用自定义UIView和自定义UILabel偏移量
似乎没有工作.
有帮助吗?
我正在运行Xcode 4.3.3并且我的目标是iOS 5.1.我试图在游戏中包含游戏中心功能.
在对GKLocalPlayer进行身份验证时,会向用户显示登录到游戏中心的警报视图或显示已登录.到目前为止,这一切都很好,但如果用户按下" 创建新帐户"按钮,则任何打开的模态视图都会移动到根视图控制器和以下错误是从控制台吐出:
对<GKModalRootViewController:内存地址 >的开始/结束外观转换的不平衡调用.
我已经尝试在应用程序委托和根视图控制器之间移动GKLocalPlayer身份验证代码.我还尝试在一个新的空白项目中实现身份验证.我有没有使用Storyboard和ARC尝试过它.在所有这些情况下,结果都是相同的:隐藏在根视图控制器后面的模态和给出的错误.
这是我从app delegate的应用程序调用的GKLocalPlayer身份验证方法:didFinishLaunchingWithOptions: method:
- (void)authenticateLocalPlayer
{
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
[localPlayer authenticateWithCompletionHandler:^(NSError *error) {
if (localPlayer.isAuthenticated) {
// Perform additional tasks for the authenticated player.
} else {
// Disable Game Center features.
}
if (error) {
// Handle error.
}
}];
}
Run Code Online (Sandbox Code Playgroud)
这是它的截图.在此图片中,根视图控制器具有50%alpha值的背景.这个bug已经将模态推到了根视图控制器后面.
这个stackoverflow问题包含我可以找到的这个错误的唯一引用(关于GKModalRootViewController),它不适合,因为(a.)我没有使用cocos2d.(b.)无论我是否执行segue,我都不会触及viewWillAppear:或viewDidAppear :. (c.)没有给出可接受的答案.
这个问题和这个问题似乎涉及相同的问题(视图层次结构被销毁)但没有答案,也没有提到控制台错误消息.
这会发生在其他人身上吗?关于可能导致这种情况的任何想法?
更新1:我甚至将认证代码放入连接到模态视图中的按钮的IBAction,以避免任何初始化冲突.它没有帮助.
更新2:我尝试将身份验证代码移动到GCD后台队列中.他的结果是一样的.
这是测试项目(已准备好GameCenter已经输入我的应用程序的Bundle ID).
去测试:
如何防止 VoiceOver 在文本字段上说出 \xe2\x80\x9c\xe2\x80\xa6misspelled\xe2\x80\x9d ?将 auto CorrectionType 设置为 UITextAuto CorrectionTypeNo 似乎不会产生影响。
\n\n如果 iOS 用户键入拼写错误的单词,后跟空格或标点符号,Voiceover 会读出该单词,后跟 \xe2\x80\x9cmisspelled。\xe2\x80\x9d 我希望能够在特定文本字段上禁用此行为。
\n关于可访问性,我想使自定义键盘的性能类似于iOS软件键盘。当按下按钮将一个字母添加到UITextField时,VoiceOver应该在“添加的字符音”中说出该字母。当按下按钮从UITextField中删除字母时,VoiceOver应该以“已删除的字符音”说出该字母。
这是我尝试的:
[[self textField] insertText:@"a"];
。[[self textField] deleteBackward];
。我也尝试过同样的事情,将按钮移到设置为textField的inputView的UIView中。
字符已正确添加到文本字段中或从文本字段中删除,但是VoiceOver不会说这些字符。我该如何进行这项工作?
编辑:
硬件键盘可以正确地说。只是自定义软件键盘无法正常显示。
我无法让NSFileManager方法replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:
在iOS 6中工作.调用此方法并在iOS 5上正常工作的应用程序在iOS 6上存在重大问题.运行iOS 6.0以下版本的设备上不会出现此问题.如果应用程序是由Xcode在iOS模拟器中启动的,则不会出现此问题.否则问题似乎是普遍存在的.
这是我试图执行的测试代码:
NSError *error;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *destinationPath = [documentsDirectory stringByAppendingPathComponent:@"test.txt"];
NSString *sourcePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"test.txt"];
// Create initial file in documents directory
if (![fileManager fileExistsAtPath:destinationPath])
{
BOOL fileCopied = [fileManager copyItemAtPath:sourcePath
toPath:destinationPath
error:&error];
if (!fileCopied)
[[self statusLabel] setText:[NSString stringWithFormat:@"Creation Error:\n\n%@",
[error localizedDescription]]];
}
// Replace file in documents directory with copy of file from app bundle
if ([fileManager fileExistsAtPath:destinationPath])
{
NSURL …
Run Code Online (Sandbox Code Playgroud) ios ×5
iphone ×2
voiceover ×2
game-center ×1
ios6 ×1
ios7 ×1
objective-c ×1
uipickerview ×1
uitextfield ×1
xcode ×1