Tag: 访问

使用UIViewController像Slck一样滑动UIInputView

我想使用UIViewController的input附件视图是这样的: override func canBecomeFirstResponder() -> Bool { return true } override var inputAccessoryView: UIView! { return self.bar } 但问题是我有一个抽屉如视图,当我滑动视图打开,input视图停留在窗口上。 我怎样才能保持input视图像中央视图像松弛这样做。 在我的input视图停留在底部的情况下,占用全屏幕(红色是下图中的input视图):

在iOS应用中使用大文字辅助function

在iOS设备中,可以在辅助function设置中设置大文本。 用户可以在这里指定不同的字体大小。 我想在我的应用程序中使用这种字体大小。 在“辅助function计划指南”中,我没有在我的应用程序中find有关访问此字体大小的任何信息 它只提到标准的苹果应用程序邮件,联系人,日历等正在使用它。 有谁知道在开发应用程序时是否可以访问这些信息? 当设置大文本function时,UIFont的静态-FontSize方法也不会返回不同的值。 ( 注意:不要与iOS 7的新dynamictypes混淆,这是“辅助function”设置下的一个不同的旧选项。

iOS第一个应用程序“self.userName = textField.text”。 何时使用自我

这里是苹果的“你的第一个iOS应用程序”文件的代码片段。 – (IBAction)changeGreeting:(id)sender { self.userName = textField.text; NSString *nameString = self.userName; if ([nameString length] == 0) { nameString = @"World"; } NSString *greeting = [[NSString alloc] initWithFormat:@"Hello, %@!", nameString]; label.text = greeting; [greeting release]; } 我明白,self.username调用合成设置方法(重要的,因为它有一个复制标志)。 为什么textField.text和label.text不是self.textField.text和self.label.text。 这两个等价物吗? 是不是自己不必要,因为点符号已经存在,哪些已经可以访问get方法?

UnauthorizedAccessException:访问path是拒绝Ios

我知道这已经出现了一段时间,但我无法解决我尝试的任何解决scheme的错误。 我刚开始testing我的应用程序 – 将截图保存到ios设备代码是 – string GetiPhoneDocumentsPath() { string path = Application.dataPath.Substring(0, Application.dataPath.Length – 5); path = path.Substring(0, path.LastIndexOf("/")); return path + "/Documents/"; } string CreateImagesDirectory(string documentsPath) { //System.IO.File.SetAttributes (documentsPath, FileAttributes.Normal); string imagePath = documentsPath +"magicimages/"; if (Directory.Exists(imagePath)) {return imagePath;} DirectoryInfo t = new DirectoryInfo(documentsPath); //Directory.CreateDirectory(imagePath); t.CreateSubdirectory("magicimages"); System.IO.File.SetAttributes (imagePath, FileAttributes.Normal); return imagePath; } 要文件 Debug.Log("Do […]