iOS上的OpenGL ES 2.0对象拾取

什么是select在OpenGL ES 2.0(iOS)中绘制的对象的最佳方法? 我正在绘制点。

从iPhone上的audiostream获取Hz频率

从iOS上的audiostream(音乐)获取Hz频率值的最佳方法是什么? 苹果公司提供的最好和最简单的框架是做什么的。 提前致谢。

将NSDictionary对象转换为NSData对象,反之亦然

我必须将一个NSDictionary对象转换成NSData ,而且我必须从NSData对象中获取相同的NSDictionary 。 我应该怎么做呢?

使用UIPageViewController和swift和多视图控制器

我试图在多个视图控制器的Swift应用程序中使用UIPageViewController 。 我有两个视图控制器在我的故事板( firstViewController和secondViewController )都embedded在自己的导航控制器。 他们有故事板标识符“ FirstViewController ”和“ SecondViewController ”。 我也有一个页面视图控制器在我的故事板与identifierPageView控制器,并将导航设置为水平和过渡样式滚动属性检查器。 FirstViewController是应用程序的根视图控制器 我想firstViewController成为页面视图控制器的第一页,所以我写了它的类如下所示: import Foundation import UIKit class FirsttViewController: UITableViewController, UIPageViewControllerDataSource, UIPageViewControllerDelegate { override func viewDidLoad() { let pageViewController: PageViewController = self.storyboard.instantiateViewControllerWithIdentifier("PageViewController") as PageViewController pageViewController.delegate = self var viewControllers: [UIViewController] = [self] pageViewController.setViewControllers(viewControllers, direction: UIPageViewControllerNavigationDirection.Forward, animated: false, completion: nil) pageViewController.view.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.height) […]

准确的iOS时间

我正在查看iOS SDK中的“节拍器”示例代码( http://developer.apple.com/library/ios/#samplecode/Metronome/Introduction/Intro.html )。 我以60 BPM的速度运行节拍器,这意味着每秒钟都有一个节拍。 当我看一个外部手表(PC的手表)时,我看到节拍器运行速度太慢 – 它每分钟都失败一次,这是应用程序。 15毫秒一致的错误。 相关代码片段是: – (void)startDriverTimer:(id)info { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // Give the sound thread high priority to keep the timing steady. [NSThread setThreadPriority:1.0]; BOOL continuePlaying = YES; while (continuePlaying) { // Loop until cancelled. // An autorelease pool to prevent the build-up of temporary […]

等待asynchronous操作在Swift中完成

我不知道如何处理这种情况,因为我对iOS开发和Swift非常陌生。 我正在执行数据获取,如下所示: func application(application: UIApplication!, performFetchWithCompletionHandler completionHandler: ((UIBackgroundFetchResult) -> Void)!) { loadShows() completionHandler(UIBackgroundFetchResult.NewData) println("Background Fetch Complete") } 我的loadShows()函数分析从一个网站加载到UIWebView的一堆数据。 问题是我有一个计时器,在loadShows函数中等待10秒左右。 这允许在我开始分析数据之前,页面中的JavaScript完全加载。 我的问题是完成处理程序在我的loadShows()之前完成。 我想要做的是添加一个“isCompletedParsingShows”布尔,并使completionHandler行等待完成,直到该布尔值为true。 处理这个问题的最好方法是什么?

什么是iPhone中的像素和点?

从UIImage参考, 尺寸 图像的尺寸,考虑到方向。 (只读) @property(nonatomic, readonly) CGSize size 讨论 在iOS 4.0及更高版本中,此值反映图像的逻辑大小,以点为单位。 在iOS 3.x及更早版本中,此值始终反映以像素为单位测量的图像尺寸。 像素和点之间有什么区别?

iOS – 集成信用卡付款

我知道我们可以将应用程序内购买与storekit集成在一起。 但我想要使用信用卡进行支付。 苹果将​​允许整合这样的图书馆? 有没有这样的图书馆,用户可以使用他们的信用卡支付产品在我的应用程序?

如何调整iOS上的类方法?

方法swizzling很好,例如方法。 现在,我需要调整一个类的方法。 任何想法如何做到这一点? 试过这个,但它不起作用: void SwizzleClassMethod(Class c, SEL orig, SEL new) { Method origMethod = class_getClassMethod(c, orig); Method newMethod = class_getClassMethod(c, new); if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); else method_exchangeImplementations(origMethod, newMethod); }

在没有CoreText的UIImage中围绕UITextView中的文本

有没有办法从UITextView围绕UIImage文本,而不使用CoreText ? 我一直玩的属性string没有太多的运气, CoreText似乎是非常复杂的,所以我宁愿不离开它。