大佬教程收集整理的这篇文章主要介绍了ipad – UITextView宽度大于512不显示文本,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
textView = [[UITextView alloc] initWithFrame: CGRectMake(0,513,1024)];
它不再显示任何文本… 512工作,任何大小也低于这个,但任何大于512,它停止显示任何文本.完整代码:
- (void)loadView { self.navigationItem.hidesBACkButton = YES; self.view = [[UIView alloc] init]; self.view.BACkgroundColor = [UIColor blackColor]; RDLocalizedStrings * Strings = [RDLocalizedStrings defaultLocalizedStrings]; NSString* message = [Strings getStringWithKey: @"noupdatesAvailableText"]; CGFloat messageFontSize; RDRectCreate(messagE); BOOL iPad = NO; #ifdef UI_user_iNTERFACE_I@L_507_4@m iPad = (UI_user_iNTERFACE_I@L_507_4@m() == UIUserInterfaceI@L_507_4@mPad); #endif if (iPad) { RDRectWrite(message,100,200); messageFontSize = 20.0; } else { RDRectWrite(message,320,480); messageFontSize = 20.0; } textView = [[UITextView alloc] initWithFrame: messageRect]; textView.text = message; textView.BACkgroundColor = [UIColor redColor]; textView.textAlignment = UITextAlignmentCenter; textView.textColor = [UIColor whiteColor]; textView.font = [UIFont systemFontOfSize: messageFontSize]; textView.editable = NO; [self.view addSubview: textView]; }
以上是大佬教程为你收集整理的ipad – UITextView宽度大于512不显示文本全部内容,希望文章能够帮你解决ipad – UITextView宽度大于512不显示文本所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。