xcode4.5

How to Add UIImageView with UILabel in navigation bar of iphone?

烂漫一生 提交于 2019-12-04 19:33:17
I have some navigation bar in my UI of iphone app. Now i want to add two images on the navigation bar on center of the navigation bar.. I have successfully added the two UIImageView on the navigation-bar but my problem is that i have two UIImageView with the label on it .. Let me show u the snapshot ... now my problem is i don't know how to add this kind of label near UIImageView in navigation bar..so please if anyone can guide me for this then it will help me a lot.. i have already successfully inserted two images on navigation bar with this Code. UIImageView *Messageview = [[UIImageView

How do I resolve this deadlock that happen ocassionally?

拈花ヽ惹草 提交于 2019-12-04 19:29:24
I have one managedObjectContext with concurency type of NSMainQueueConcurrencyType + (NSManagedObjectContext *)managedObjectContextMainThread { static NSManagedObjectContext *__managedObjectContext=nil; @synchronized(self) { if (__managedObjectContext != nil) { } else { NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; if (coordinator != nil) { __managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; [__managedObjectContext setPersistentStoreCoordinator:coordinator]; } } } return __managedObjectContext; } The

iOS: Is there absolutely no way to build for armv6 in Xcode 4.5?

半世苍凉 提交于 2019-12-04 18:15:01
问题 Starting with Xcode 4.5 the possibility of building for armv6 devices is not given anymore (iPhone/iPod touch 1st and 2nd generation). This means no new versions of our app for iPhone 2G and 3G which is very unlucky. Does anyone know if there will be a workaround? I really don´t see any technical reasons for this. 回答1: You can have multiple versions of xcode installed. In the past, that has been the fix needing to use an older xcode feature. It is a workaround, and the project files may

Xcode 4.5 - CopyPNGFile persists. Need new ideas

∥☆過路亽.° 提交于 2019-12-04 17:17:33
问题 I'm making an iPad app and it runs on the simulator, but fails when i try building it for the device. the error is below: These are the things i've tried to rectify this issue: went through every PNG file with Photoshop and saved them again w/o the interlace Deleted all the images in my Resources folder and added them again by dragging/dropping the images again Deleted ALL PNG images (left the JPGs) and it works...when i add one PNG, Xcode throws a hissy fit. Deleted the derivedData in my

XCode simulator is not displaying latest changes

妖精的绣舞 提交于 2019-12-04 17:11:41
I am creating an app in XCode 4.5. My problem is that I am running app in simulator but it is not showing recent changes. On resetting Content and Settings from iOS simulator option it shows latest output. But, if I close simulator and ran app again, it again shows old output. Can anyone have idea, what is behind that and how to fix this? Thanks. What I do when this happens: 1) delete the app from the simulator 2) run Project>Clean 3) run Project>Clean Build Folder (CMD + Shift + Option + k) 4) manually delete the Derived Data folder for the app (you'll find this under Organizer>Projects) You

How to make xcodeproj file relative in Xcode 4.5

亡梦爱人 提交于 2019-12-04 16:50:00
I was following this tutorial and stumbled across this screen shot: apparently there was a way to make the Xcode project file relative to some user defined env variable in earlier versions of Xcode (you get there by highlighting the project file then clicking cmd + i ) I couldn't find a way to this in Xcode 4.5 (the closest I could get to that was this post, but the instructions don't work on Xcode 4.5) ideas? update : I tried the idea of changing the 'header search paths' under build settings.. and setting 'always search user paths' to 'yes' as suggested here .. but then my project always

how to set iphone tab bar icon by custom images using story board

一曲冷凌霜 提交于 2019-12-04 16:14:02
问题 I am newbie to iphone development,I need to put a custom image icon in the tab bar .But it showing only the default colour(Black&blue) .Help me to overcome from this bug friends...? 回答1: add the Images in application, and See attached Image 回答2: Use this code in viewDidLoad UIImage *selectedImage0 = [UIImage imageNamed:@"selected.png"]; UIImage *unselectedImage0 = [UIImage imageNamed:@"unselected.png"]; UITabBarItem *item0 = [tabBar.items objectAtIndex:0]; [item0 setFinishedSelectedImage

Waiting for <appname> to launch forever

元气小坏坏 提交于 2019-12-04 13:17:25
I can't run my program anymore in simulator or on iPhone. It compiles just fine. No issue. But then I got the message Waiting for to launch It happens forever. This happen only in one project. Check which provisioning you are using, it seems that ad-hoc provisioning cannot be used for debbuging. If your problem is not save with above instruction then also try these: Stop the app from running in Xcode. Delete the app from the device (or Simulator). Select Product > Clean from the Xcode menu. Close Xcode. Close the Simulator (or restart the device). Restart your computer & then check. Hope this

Xcode 4.5 - OS X Cocoa Application - Basic Web View: Load Google when opened

让人想犯罪 __ 提交于 2019-12-04 12:59:23
I'm trying to create an extremely basic OS X Cocoa Application that when opens loads http://www.google.com . As basic as possible (no back or forward buttons, etc.). I have little experience with Xcode 4.5 and I can't find any tutorials regarding a web view for OS X Cocoa Application AND Xcode 4.5. I was able to find a tutorial and create a web view for an iOS web view. I took what I learned but didn't get very far. Here's what I did so far: Created New OS X Cocoa Application in Xcode 4.5.2 Added a WebView object to the Window object Based on the iOS web view tutorial I assume all I need to do

unable to check if a configuration profile exists on the iPhone

只谈情不闲聊 提交于 2019-12-04 12:49:30
I am trying to check if a configuration profile exists on the iPhone , I found the following tutorial on how to do it : http://alex.tapmania.org/2011/09/check_conf_prof_is_installed_ios.html which , for me , translates into the following code : NSString * certPath = [[NSBundle mainBundle] pathForResource:@"certificate" ofType:@"mobileconfig"]; SecTrustRef trust; NSData * certData = [NSData dataWithContentsOfFile:certPath]; SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef) certData); SecPolicyRef policy = SecPolicyCreateBasicX509(); OSStatus err =