ios5

ARC App Crashes when accessing @property form ARC static lib

本小妞迷上赌 提交于 2020-01-01 02:44:12
问题 I have a ARC (automatic-reference-counting) app that builds a static library (also ARC). The app will launch fine but when the an action is performed that reads or writes to a @property in the static library the app will crash with this error: dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic Referenced from: /var/mobile/Applications/0E7ADBB4-FFE5-4CEB-B418-8A35A92E99D4/MyApp.app/MyApp Expected in: /usr/lib/libobjc.A.dylib dyld: Symbol not found: _objc

How do i associate excel file type (xlsx) with iPhone application

寵の児 提交于 2020-01-01 02:32:09
问题 Hi i have managed to open .xls files form mail app by adding document type to the project build and set the Types field to "com.microsoft.excel.xls" (see screen shot). I want to do the same with xlsx files but can't do it. I tried to add "com.microsoft.excel.xlsx" but it didn't work 回答1: I solved that by defining custom UTI as follows. Try to add these definitions into your info.plist. It works as expected. <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key>

Unable to add a source with url

半城伤御伤魂 提交于 2019-12-31 21:33:21
问题 [!] Unable to add a source with url git@github.com:CocoaPods/Specs.git named master-1 . You can try adding it manually in ~/.cocoapods/repos or via pod repo add . please any help 回答1: Please follow this link for this problem. Its possible to forgott set your newly install Xcode path on command-line tool. Xcode-->Preferences-->Locations-->Command line tool --> set your Xcode. 回答2: You may need to reset your command line tools: sudo xcode-select -r I was receiving the same error message. Then I

Manual retain with ARC

谁说我不能喝 提交于 2019-12-31 08:57:08
问题 Before ARC I had the following code that retains the delegate while an async operation is in progress: - (void)startAsyncWork { [_delegate retain]; // calls executeAsyncWork asynchronously } - (void)executeAsyncWork { // when finished, calls stopAsyncWork } - (void)stopAsyncWork { [_delegate release]; } What is the equivalent to this pattern with ARC? 回答1: Why not just assign your delegate object to a strong ivar for the duration of the asynchronous task? Or have a local variable in

Why Does String Not Equal What Is Stored?

别说谁变了你拦得住时间么 提交于 2019-12-31 07:32:19
问题 This is a simple, odd question... if(tableViewNum == @"One") { if ([drinkArray objectAtIndex:0] == currentDate) { [updatedArray addObject:drinkArray]; NSLog(@"MADE THE ELSE1"); } NSLog(@"MADE THE ELSE2"); } else if (tableViewNum == @"Two") { if ([[drinkArray objectAtIndex:0] isEqualToString:yesterdayDate]) [updatedArray addObject:drinkArray]; } else { NSLog(@"MADE THE ELSE %@",tableViewNum); [updatedArray addObject:drinkArray]; } In the very first if statement I ask if tableViewNum == @"One"

iOS Minimum OS Requirements different between Xcode project and iTunes Connect

烈酒焚心 提交于 2019-12-31 05:27:06
问题 I submitted an app to iTunes 7 days ago. Its status is "Waiting For Review" I set iOS Deployment Target as 6.0 in the project's settings: I did not do anything about minimum os version or deployment sdk in info.plist file: I archived and submitted my app to iTunes Connect. Today, when I check Binary Details of my app, I see this, "Minimum OS Requirements : 5.0" : Why is there a difference between my iOS Deployment Target and Minimum OS Requirements? Did I do something wrong? (e.g. info.plist

A home button in iOS 5, xcode 4.2, Story board

徘徊边缘 提交于 2019-12-31 05:20:28
问题 iOS 5.0, xCode 4.2 I am doing a multistep questionnaire. There are about 10 questions on each branch, and there are sub branches. But the logic is fairly linear. Mostly Yes/no answers, but some multi choice options. The questionnaire will come to a conclusion page. On this conclusion page, I would like to have a button that says HOME which takes the user to a specific start page so they can start again. The problem is that I want the navigation controller stack to be cleared so the back

SQLite insert works in simulator but not on device

三世轮回 提交于 2019-12-31 04:03:16
问题 Here is SQLite code which I call and pass one variable. Where is problem? -(IBAction)insertPet:(NSString *) name{ NSString *query = [NSString stringWithFormat:@"Insert into pet (name) values ('%@');", name]; sqlite3_stmt *statement; NSLog(@"1 - %@",query); if(sqlite3_prepare_v2(database, [query UTF8String], -1, &statement, nil)==SQLITE_OK) { NSLog(@"2 - %@",query); if(SQLITE_DONE == sqlite3_step(statement)){ NSLog(@"Query - %@",query); } sqlite3_finalize(statement); } } 回答1: My guess is that

setting exclusiveTouch to custom UITableViewCell

Deadly 提交于 2019-12-31 03:26:05
问题 I am trying to set the exclusiveTouch property to my custom UITableViewCell. However, adding this code does not seem to work. for (UIView *view in cell.subviews) { if ([view isKindOfClass:[UIView class]]) { view.exclusiveTouch = YES; } } Could someone help me figuring out what I am missing or what I am doing wrong? 回答1: Not sure but give it a try: cell.exclusiveTouch = YES cell.contentView.exclusiveTouch = YES 来源: https://stackoverflow.com/questions/11616855/setting-exclusivetouch-to-custom