ios5

resourcePath not working Xcode

本秂侑毒 提交于 2020-02-08 05:58:50
问题 I have created a sqlite database containing data for my app, and dragged it into the supporting files group in Xcode. When I try to access it using: NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"database.db"]; It does not read the file. However if I put in the full file path: NSString *bundlePath = @"Users/xxxx/Apps/App/database.db"; The app works fine. I printed out the file path from: NSString *bundlePath = [[[NSBundle mainBundle] resourcePath

UISplitView : Need to hide left view for initial two screens

房东的猫 提交于 2020-02-08 02:42:47
问题 I have gone through various threads and tutorials but not able to find any solutions, so need to post the question. So the questions is : For initial three screens need to display only the detail view without any popover button at navigation bar in landscape. Now in third screen on button click i need to load the splitview with both left and right view. I am aware of the methods which hides the left view panel in landscape mode. The only part i am worried id to load the splitview from 3rd

Formatting and Bullets in a TextBox in iOS5

独自空忆成欢 提交于 2020-02-05 04:37:28
问题 Does anyone know how to insert bullets and do some formatting in a textbox, maybe in a webview (as shown in the print screen below) in iOS 5, XCode 4.3? 回答1: For the UITextView manually add dots and newlines, for example: NSArray *items = [NSArray arrayWithObjects:@"Stack",@"Overflow",nil]; NSMutableString *formattedString = [[NSMutableString alloc] init ]; for (NSString *item in items) [formattedString appendFormat:@"\u2022 %@\n", item]; theTextViewName.text = formattedString; For the

Application still running in background Xcode 4.2 iOS 5

末鹿安然 提交于 2020-02-03 08:40:49
问题 i wrote an application on the Xcode 4.2 using iOS SDK 5.0. i have set the UIApplicationexitonsuspend in the info.plist to YES but when i double press the home button, the application is still in the multitasking bar. i have deleted the app from my iPhone 4s and resend it again from Xcode but still the exit on suspend does not work. application still lingers on multitasking tab. 回答1: The fact that your app icon is shown in the "multitask tab" does not mean that your app is still there. The

Application still running in background Xcode 4.2 iOS 5

余生颓废 提交于 2020-02-03 08:40:47
问题 i wrote an application on the Xcode 4.2 using iOS SDK 5.0. i have set the UIApplicationexitonsuspend in the info.plist to YES but when i double press the home button, the application is still in the multitasking bar. i have deleted the app from my iPhone 4s and resend it again from Xcode but still the exit on suspend does not work. application still lingers on multitasking tab. 回答1: The fact that your app icon is shown in the "multitask tab" does not mean that your app is still there. The

moveRowAtIndexPath doesn't refresh the cell's content

别等时光非礼了梦想. 提交于 2020-02-03 04:22:26
问题 iOS 5 finally added a moveRowAtIndexPath:toIndexPath: method to UITableView . Problem is, calling it only moves the row, it doesn't update/redraws it. The only way to do so seems to be by finding the cell and calling setNeedsDisplay directly. But this is tricky since you never know whether the cell already got moved or not. I can't call reloadRowsAtIndexPaths: either, since I'm not allowed to have 2 animations applied to a single row inside the same beginUpdates-endUpdates block. There are

GLKTextureLoader fails when loading a certain texture the first time, but succeeds the second time

落花浮王杯 提交于 2020-02-01 01:35:13
问题 I'm making an iPhone application with OpenGL ES 2.0 using the GLKit. I'm using GLKTextureLoader to load textures synchronously. The problem is that for a certain texture, it fails to load it the first time. It gives this error: The operation couldn’t be completed. (GLKTextureLoaderErrorDomain error 8.) For this error code, the apple documentation says the following: GLKTextureLoaderErrorUncompressedTextureUpload An uncompressed texture could not be uploaded. Available in iOS 5.0 and later.

Code Coverage GCov not working with XCode 4.2 and iOS SDK 5

梦想与她 提交于 2020-01-30 06:45:30
问题 I've been trying to get GCov working with Xcode 4.2Build 4D199 on Lion with iOS SDK 5.0 to no avail. Has anyone had any luck with this? I'm using Google Tools For Mac for my unit tests and I've linked in libprofile_rt.dylib and added: "OTHER_CFLAGS[arch=*]" = ( "-ftest-coverage", "-fprofile-arcs", "-falign-loops=16", ); as indicated on the Coverstory page here http://code.google.com/p/coverstory/wiki/UsingCoverstory But when I find . -name *.gcda" I come up empty. What am I missing? 回答1: GCov

adding multiple pins on google map in ios

社会主义新天地 提交于 2020-01-29 23:37:45
问题 I want to add multiple pins on a google map, while it is being loaded. I have a list of Latitude and Longitude values of nearby locations. How can I show all these locations on the map with a pin. I am using Google SDK for iOS. I am using the following code, but it didn't work for me. NSMutableArray *array = [NSMutableArray arrayWithObjects:@"12.981902,80.266333",@"12.982902,80.266363", nil]; CLLocationCoordinate2D pointsToUse[5]; for (int i = 0; i < [array Size]; i++) { pointsToUse[i] =

adding multiple pins on google map in ios

谁说我不能喝 提交于 2020-01-29 23:36:34
问题 I want to add multiple pins on a google map, while it is being loaded. I have a list of Latitude and Longitude values of nearby locations. How can I show all these locations on the map with a pin. I am using Google SDK for iOS. I am using the following code, but it didn't work for me. NSMutableArray *array = [NSMutableArray arrayWithObjects:@"12.981902,80.266333",@"12.982902,80.266363", nil]; CLLocationCoordinate2D pointsToUse[5]; for (int i = 0; i < [array Size]; i++) { pointsToUse[i] =