xcode4.2

Lexical or Preprocessor Issue with "#import <map>

被刻印的时光 ゝ 提交于 2019-12-12 10:38:02
问题 I have an XCode 4.2 project that I've been working with all day just fine and all of the sudden, after an XCode crash, my project started to compile with the error: "file myClass.m: error: Lexical or Preprocessor Issue: 'map' file not found" where myClass.m uses: #import <map> #import <vector> I've tried a clean build but xcode is still complaining. How can I get it to recognize std:vector and std:map libraries again? 回答1: it's because your source is not c++ or objc++. change myClass.m to

Using ARC and UITableViewController is throwing Observation info was leaked, and may even become mistakenly attached to some other object

一个人想着一个人 提交于 2019-12-12 09:28:20
问题 I cannot seem to figure out what to do to resolve this error that I am receiving. I click on a cell which pops a new UITableViewController onto the stack. Once I hit the back button on the Navigation UI when in this controller I receive this error in the debugger but there doesn't seem to be any issue with the app as it doesn't crash or hang and still works fine. An instance 0x79a8400 of class UITableView was deallocated while key value observers were still registered with it. Observation

Using presentModalViewController with UIImagePickerController causing Crash on iOS 5

亡梦爱人 提交于 2019-12-12 05:32:16
问题 Using presentModalViewController with UIImagePickerController causing Crash on iOS 5 (its running fine on version<5), i am trying to get all the albums on the device, using 'UIImagePickerControllerSourceTypeSavedPhotosAlbum' is only getting the Camera images, so when i change the sourceType to 'UIImagePickerControllerSourceTypePhotoLibrary' it crashes, i appreciate any help, here is my code: float version = [[[UIDevice currentDevice] systemVersion] floatValue]; if(version < 5) imgPicker

Could not set tab bar image in Xcode 4.2 Programmatically

丶灬走出姿态 提交于 2019-12-12 05:31:56
问题 I created new tab bar project in xcode 4.2 and there is no app delegate xib file. Project has two navigation controller. I can set name of tab bar but couldn't set image. I am completely fed up with many tries. FirstViewController *firstView = [[FirstViewController alloc] initWithNibName:@"FirstViewController_iPhone" bundle:nil] firstView.title=@"Birthdays"; firstView.tabBarItem.image=[UIImage imageNamed:@"bottomleft.png"]; SecondViewController *secondView = [[SecondViewController alloc]

methods in a framework not responding to method calls

青春壹個敷衍的年華 提交于 2019-12-12 05:26:36
问题 i have created a framework from an existing codebase by referring this link "How to create a framework in iOS". I was able to create a framework successfully. Now, i have imported this framework into a new project and tried to call the methods in it. But, there is no response from any of these methods. Even the NSLog statements in these methods are also not getting printed. There are no erros either. this is very frustrating. Can anyone help me out as to where i am going worng... #import

iPhone CGContextDrawImage and UIImageJPEGRepresentation drastically slowing down application

拜拜、爱过 提交于 2019-12-12 04:36:07
问题 I have an application that uses camera to take images. Application works but is very slow, taking ~10 seconds to process images. By process i mean, rotating, creating thumbnail and saving them both to flash memory. Application is based on Cordova, but i dont have a part in that. And this is running on older model, iPhone 3G, but trying this app on newer model doesn't yield much better results. The main bottleneck is aforementioned CGContextDrawImage and UIImageJPEGRepresentation functions. I

how to attach a class to a view in the main story board

笑着哭i 提交于 2019-12-12 03:04:35
问题 I am new to XCode 4.2 , and I am trying to find a way to attach a class (.h and .m files) to a view in my main storyBoard ... how can I do that ? Thanks 回答1: if it's a subclass of UIViewController, you can assign in interface builder in xcode. Open the .xib, select your view, open the properties and assign a custom class Here is a screenshot : http://i.stack.imgur.com/fl4up.jpg 来源: https://stackoverflow.com/questions/8855526/how-to-attach-a-class-to-a-view-in-the-main-story-board

Is it possible to install Xcode on iPad for iOS apps developemnt? [closed]

被刻印的时光 ゝ 提交于 2019-12-12 02:29:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Can we develop iOS apps for iPhone as well as iPad using iPad itself? 回答1: Is it possible to install Xcode on iPad for iOS apps developemnt? No, Xcode runs on OS X only. Can we develop iOS apps for iPhone as well as iPad using iPad itself? Yes, we can, at least if targeting jailbroken devices is an option. There

Weird Behavior on dismissing Modal View Controller

寵の児 提交于 2019-12-12 02:03:06
问题 First post, have been lurking for a while reading. I have an app that needs to access the contacts on the device and this works ok, however when I dismiss the control, it goes away but I also lose other elements on my app. I have a View Controller that contains 1 main view, this has a navigation bar as a header and a tab bar as a footer. I have an overlay view that contains the button to trigger the address book component. When the dismiss happens, the tab bar and nav bar disappear with the

How to use GCMathParser in iOS 5 application (XCode 4.2) with ARC?

三世轮回 提交于 2019-12-11 19:15:25
问题 After changing - #import <Cocoa/Cocoa.h> to #import <UIKit/UIKit.h> - "pi" to "M_PI" and disabling ARC for the GCMathParser files, I get the following error: (multiple places) Cast of C pointer type "void*" to Objective-C pointer type "GCMathParser*" requires a bridged cast What do I have to do? Thanks 回答1: ARC doesn't let you hide objects behind untyped pointers -- it needs to know which pointers are objects in order to do its magic. If you're dealing with a framework that relies heavily on