Tag: ipad

UIView粘在UIScrollView的底部

所以我在UIViewController的UIView里面有一个UIScrollView,里面添加了一个UIView,而且我希望它总是坚持在底部而不pipe方向的变化。 所以我有以下几点: 问题是,当我旋转到横向时,滚动视图的内容大小高度肯定会比框架高度大,因此它向下滚动。 然而,这个UIView,我想坚持在底部不坚持。 我如何做到这一点,以便它始终坚持底部,无论方向的变化。 当我禁用UIScrollView自动调整子视图,这个UIView坚持到底部,但宽度不调整时旋转

如何设置iPad Pro静态启动图像

在“graphics – >启动屏幕”一节中查看“苹果人员交互指南”,其中提供了以下有关静态启动屏幕图像的信息Apple HIG “最好在启动屏幕上使用Xcode storyboard,但是如果需要的话,你可以提供一组静态图片,为不同的设备创build不同尺寸的静态图片,并确保包含状态栏区域。 然后列出了iOS 10中支持的所有设备。 有没有人知道如何做到这一点,例如12“的iPad Pro?在资产目录中无处添加图像。我是否需要在Info.plist文件中使用UILaunchImages数组?有一个例子。 提前致谢。

如何使用CGContext iOS在其他设备方向绘制string

我试图在iPhone上绘制一些文本,但是在横向模式下,主页button位于左侧。 所以我需要以某种方式扭转数字(我猜我使用了一个转换)? 这是我现在拥有的: CGContextSetRGBFillColor(context, 1.0, 0, 0, 1.0); CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0); CGContextSelectFont(context, "Helvetica", 20, kCGEncodingMacRoman); CGContextSetTextMatrix(context, CGAffineTransformMakeRotation(M_PI/2)); CGContextSetTextDrawingMode(context, kCGTextFill); NSString *t = [NSString stringWithFormat:@"%i",seconds]; const char *str=[t UTF8String]; CGContextShowTextAtPoint(context,6.0,15.0,str,strlen(str)); 我需要添加什么来旋转文本,以便在手机左侧的homebutton处于横向时可以阅读文本。

强制iPad应用程序在纵向支持时以纵向启动

我的iPad应用程序包含支持横向模式的应用程序中的某个地方。 对于被调用的视图中的shouldAutorotateToInterfaceOrientation ,我必须在info.plist中声明支持横向。 问题: 启动应用程序时显示的UITabController不支持横向模式,我确保在所有的标签栏的视图控制器中指定它。 但是,当设备处于横向模式时启动应用程序时,Tab控制器显示为横向,并且所有标签都看起来失真。 将info.plist设置为仅支持纵向模式将强制应用程序正常启动,但是在可旋转视图控制器上将忽略shouldAutorotateToInterfaceOrientation。 我尝试推出的另一个选项是: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]; 这实际上迫使应用程序以纵向显示,但也使应用程序忽略可旋转的viewcontroller进一步的设备旋转。 更新:这只是iOS6的问题,不能在模拟器上发现

用UIWebView显示PDF不工作

所以,我意识到在使用UIWebView在应用程序中显示PDF(在iPad上)方面存在很多问题。 我已经检查了我能find的所有东西,但我似乎无法find任何满意的结果。 我想要做的是非常基本的,所以我真的不知道为什么它不工作。 我所需要做的就是在UIWebView中显示本地存储的PDF。 从本质上讲,我所得到的只是一个黑屏。 如果有人可以看看我的代码,我真的很感激。 谢谢。 – (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Segue to the materials screen. if ([segue.identifier isEqualToString:@"materials"]) { PDFViewController *pdfViewController = [segue destinationViewController]; NSIndexPath *path = [self.tableView indexPathForSelectedRow]; int row = [path row]; Lesson *selected = [purchasedLessons objectAtIndex:row]; pdfViewController.selectedLesson = selected ; //Start Load PDF in UIWebView pdfViewController.pdfWindowTitle.title = selected.titleAndSubtitle; […]

UIBezierPath橡皮擦

我在iPad应用程序中使用UIBezierPath进行免费手绘。 我想为这个UIBezierPath应用橡皮擦。 但是我只想通过这条path擦除绘图。 我不能使用path颜色作为背景颜色,因为我在背景上有其他元素。 有谁能够帮助我。 以下是我的免费手绘图的代码。 – (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor clearColor]; self.opaque = NO; lineWidths = 10; brushPattern = [UIColor greenColor]; pathArray = [[NSMutableArray alloc]init]; bufferArray = [[NSMutableArray alloc]init]; self.multipleTouchEnabled = NO; } return self; } – (void)drawRect:(CGRect)rect { for (NSMutableDictionary *dictionary in pathArray) { UIBezierPath […]

应用程序只在xcode文件中崩溃

我有一个奇怪的问题,我开发了一个应用程序,我从Xcode分析应用程序,即Xcode的>产品>分析,然后修复任何内存泄漏我得到。 我运行在iPad模拟器的应用程序,它工作正常,没有崩溃没有,在iPad设备上运行它;没有崩溃没有错误没有什么。 但是,当我试图从内存泄漏的仪器分析应用程序,在分析过程中没有内存泄漏,但在一个阶段,当我加载模态视图,然后在模态视图解雇后,应用程序崩溃和仪器显示模拟器会话超时。 可能是什么问题呢 ?

iPad的GroupTableViewBackgroundColor破碎?

任何人都知道如何在iPad上获得groupTableViewBackgroundColor? 这似乎在4.2中被打破。 我试图抓取如果从使用颜色select器的视图,但是当我重新使用它作为另一个视图的背景颜色它是一个不同的灰色阴影。

ActionScript,NetStream.Play.Failed iOS AIR手机

我试图在m4a(aac)stream类似于Tiberiu-Ionuţ斯坦本地audio文件(http://stackoverflow.com/questions/2036107/aac-mp4-not-working-in-actionscript-3s-netstream): package { import flash.net.NetConnection; import flash.net.NetStream; import flash.events.NetStatusEvent; import flash.events.AsyncErrorEvent; import flash.events.Event; public class Mysound { private var _connection:NetConnection; private var _netStream:NetStream; private var _filePath:String; private var _client:Object; public function MainDocument(filePath:String):void { _filePath = filePath; connect(); } private function connect():void { _connection=new NetConnection(); _connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler); _connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); _connection.connect(null); } private function netStatusHandler(event:NetStatusEvent):void { switch […]

为什么在应用程序中显示UIAlertView:didFinishLaunchingWithOptions:导致错误?

在我的应用程序的第一次运行时,我显示一个警报视图,供用户selectiCloud或本地文档存储。 显示警报视图导致以下错误: 应用程序启动结束时,应用程序预期具有根视图控制器wait_fences:无法接收回复:10004003 为什么发生这种情况? 如何在启动时显示警报视图而不会出现此错误? – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Check the user preferences for document storage options if (![UserPreferencesHelper userDocumentStoragePreferencesHaveBeenCreated]) { // User preferences have not been set, prompt the user to choose either iCloud or Local data storage UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Use iCloud?" message:@"Would you like to store data […]