Tag: iOS 7

在导航栏下添加一个粘滞的视图

我已经看到了其他一些例子,但是我没有看到任何真正坚持的东西。 我想要的基本上是一个tableViewHeader。 我有一个导航栏的tableViewController。 我想放置一个视图,在导航栏正下方的小栏中显示一些search条件。 但是当用户滑动查看结果时,我需要粘贴它。 我已经尝试添加一个UIView作为导航栏的子视图,但它总是坐在导航栏的顶部,覆盖一切。

自定义循环进度视图

我search了很多,但无法在互联网上find像这样的控制。 你能帮我做我自己的吗?

在iOS 7上使用AVSpeechSynthesizer,但保留iOS 6的兼容性

你好,我了解TTS只在iOS 7中可用,但我过去通过检查类是否可用,并设法保留以前版本的兼容性,但使用AVSpeechSynthesizer它似乎没有工作,可以请帮我使用TTS for iOS 7,并通过在iOS 6中禁用它来保持兼容性,非常感谢。 这是我的代码,但似乎没有工作 if (([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)) { if([AVSpeechSynthesizer class]) { AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init]; AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:text]; utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; utterance.rate = AVSpeechUtteranceDefaultSpeechRate/2; utterance.pitchMultiplier = 0.9; utterance.preUtteranceDelay = 0; utterance.postUtteranceDelay = 0; [synth speakUtterance:utterance]; } else { // Feature not available, do […]

为我的应用程序创build一个夜晚主题

我是iOS开发新手,想知道如何添加一个类似于tweetbot 3的夜晚主题并清除。 从我的研究,我还没有真正能够find主题iOS应用程序上的任何东西。 我会在另一个主题的故事板中重新制作应用程序吗? 谢谢。

没有NIB,UIWindow不填充屏幕,iOS 7

我完全避免使用NIB。 我在iOS 7.1上遇到问题,但在iOS 8.x上没有问题。 iOS 7与iOS 8 代码在UIResponder <UIApplicationDelegate>看起来像这样 – (void) setupViewController { CGRect frame = UIScreen.mainScreen.bounds; self.window = [[UIWindow alloc] initWithFrame:frame]; self.window.backgroundColor = UIColor.whiteColor; // viewController's view is green ViewController *viewController = [[ViewController alloc] init]; UIView *view = [[UIView alloc] initWithFrame:self.window.bounds]; viewController.view = view; self.window.rootViewController = viewController; [self.window makeKeyAndVisible]; } – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary […]

如何计算iOS 7中的实际字体大小(不是边界矩形)?

编辑:链接的“重复”问题只涉及计算文本矩形。 我需要计算标签缩放后的实际字体大小,而不是string大小。 此方法现在已被弃用: size = [self sizeWithFont:font // 20 minFontSize:minFontSize // 14 actualFontSize:&actualFontSize // 16 forWidth:maxWidth lineBreakMode:self.lineBreakMode]; 如何在iOS 7中缩小文本大小以适应UILabel的字体大小?