Tag: cocoa touch

导入RNCryptor后,架构armv7的未定义符号

我导入RNCryptor,可以在这里find: https : //github.com/rnapier/RNCryptor到我的应用程序。 不过,我在日志中收到了三个错误。 Undefined symbols for architecture armv7: "_SecRandomCopyBytes", referenced from: +[RNCryptor randomDataOfLength:] in RNCryptor.o "_kSecRandomDefault", referenced from: +[RNCryptor randomDataOfLength:] in RNCryptor.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 我看到,这通常是导入的类不包含在目标中,但我已经检查了构build阶段,所有导入的类都在那里。 我不知道是什么原因造成的,我没有触及任何这些类的代码。 我也清理了几次目标。

断言失败 –

我正在parsing一个XML文件,并将其parsing的值放在一个表视图。表视图只有一个部分。但我得到以下exception: 2013-10-14 15:21:57.250 tableview [6068:907] *声明失败 – [UITableView _endCellAnimationsWithContext:],/ SourceCache /UIKit/UIKit-2380.17/UITableView.m:909 2013-10-14 15:22: 11.227 tableview [6068:907]由于未捕获的exception“NSInternalInconsistencyException”而终止应用程序,原因是:尝试将第0行插入第0节,但在第0节只有0行更新* *第一次抛出调用堆栈:( 0x33e752a3 0x3bcde97f 0x33e7515d 0x3474aab7 0x35cb0a9f 0x35de6b27 0x6a10f 0x69ce5 0x33dc6037 0x346dc599 0x6b54b 0x3478c0f5 0x33e4a683 0x33e49ee9 0x33e48cb7 0x33dbbebd 0x33dbbd49 0x379702eb 0x35cd1301 0x68bdd 0x68b64)libc ++ abi.dylib:terminate调用抛出exception 代码是: /** The NSOperation "ParseOperation" calls addFiles: via NSNotification, on the main thread which in […]

比较string格式“2.0.1”,“2.0.09”

我需要获取用户的应用程序版本号,并将其与我的服务器上的当前应用程序版本进行比较。 如果用户的应用程序版本较低,他将popup一个更新他的应用程序。 在这样做的时候,我需要将应用程序的版本与可用的版本进行比较。 在Objective-C中,如何比较格式为"2.0.1"和"2.0.09"的string并获得最高的string?

我可以知道用户何时删除我的应用程序吗?

我想知道如果我可以有一个事件或某种方式知道当用户删除我的应用程序,所以我可以从我的数据库中删除他。 可能吗?

创buildUIImageView

如何在代码中创buildUIImageView ,而不是在我的xib文件中创build它?

使用故事板中设置的标识符获取对NSLayoutConstraint的引用

我使用故事板来设置button的约束。 我在约束的属性中看到一个选项“标识符”。 我想引用这个约束,在代码中改变它的值,移动一个对象。 我怎样才能从这个标识符引用这个NSLayoutContraint 。 我阅读文档,它是这样写的 @interface NSLayoutConstraint (NSIdentifier) /* For ease in debugging, name a constraint by setting its identifier, which will be printed in the constraint's description. Identifiers starting with UI and NS are reserved by the system. */ @property (nullable, copy) NSString *identifier NS_AVAILABLE_IOS(7_0); @end 所以我意识到这是为了debugging的目的。 如果我想得到它并使用它呢? 我看到这个链接,但没有给出令人满意的答案: 如何通过它的指针获取NSLayoutConstraint的标识符?

相对date格式,过去date的输出?

我正在使用-[NSDateFormatter setDoesRelativeDateFormatting:]将date显示为“Today”或“Yesterday”。 我只是在看过去的date,但很好奇我会看到英国本土化的select。 只是 “今天” “昨天” 或者更复杂的东西 “前天” 是否可能的输出列在任何地方,以便我可以了解正确显示它们所需的屏幕空间?

如何从uitableviewcell显示uidatepicker

我怎样才能显示从UITableViewCell的UIDatePicker ,并让datepicker有一个工具栏在左上angular,你辞职呢? 有没有什么好的教程如何做到这一点?

iOS – 开始iOS教程 – variables之前的下划线?

我开始学习如何在一分钟的iOS开发,我现在有Apress开始IOS6书,我正在努力。 在第二章中,有一个简单的教程来展示两个button和一个标签,当按下button时,标签上会显示哪个button被按下。 我已经完成了这个教程,但是提出了一个我找不到答案的问题。 本教程使用ARC(自动引用计数),以防有所作为。 这里是代码, 头文件: #import <UIKit/UIKit.h> @interface MTMViewController : UIViewController @property (weak, nonatomic) IBOutlet UILabel *statusLabel; – (IBAction)buttonPressed:(UIButton *)sender; @end 和m文件: #import "MTMViewController.h" @implementation MTMViewController – (IBAction)buttonPressed:(UIButton *)sender { NSString *title = [sender titleForState:UIControlStateNormal]; NSString *plainText = [NSString stringWithFormat:@"%@ button pressed.", title]; statusLabel.text = plainText; } @end 以上是它在书中的performance,但是当在Xcode中做这个教程时,我无法用下面的代码来编译: statusLabel.text = plainText; 而不得不将其更改为: _statusLabel.text […]

UIView中的黑色背景?

我在网上跟随一个教程来绘制一个子类UIView。 本教程展示了一个带有白色背景的UIView,我通过简单的改变super的bg颜色来解决这个问题。 问题是,当触摸结束时,背景不清晰。 我不知道。 我只是试图设置填充颜色[uicolor clearcolor]; 不成功。 这是我正在使用的代码: @implementation CachedLIView { UIBezierPath *path; UIImage *incrementalImage; // (1) } – (id)initWithCoder:(NSCoder *)aDecoder { if (self = [super initWithCoder:aDecoder]) { [self setMultipleTouchEnabled:NO]; [self setBackgroundColor:[UIColor whiteColor]]; path = [UIBezierPath bezierPath]; [path setLineWidth:2.0]; } return self; } – (void)drawRect:(CGRect)rect { [incrementalImage drawInRect:rect]; // (3) [path stroke]; } – (void)touchesBegan:(NSSet […]