ios4

iOS - MKOverlayView custom view rect fills works, but line draws do not

瘦欲@ 提交于 2020-01-24 12:42:25
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

iOS - MKOverlayView custom view rect fills works, but line draws do not

僤鯓⒐⒋嵵緔 提交于 2020-01-24 12:42:18
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

iOS - MKOverlayView custom view rect fills works, but line draws do not

泄露秘密 提交于 2020-01-24 12:42:01
问题 New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My drawMapRect is getting called, and in the following code - the partially transparent green rectangle is drawn, but the lines are not. I've verified the line drawing code in drawRect of a uiview subclass, so I know it draws something :-) I'm sure I must be

AVAudioPlayer cannot play music with a NSTimer in background

自作多情 提交于 2020-01-23 03:59:25
问题 I want to play music with an AVAudioPlayer using an NSTimer, but [player prepareToPlay] returns NO & doesn't play in the background. Can somebody give me some idea? Here's my code: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(playMusic:) userInfo:nil repeats:NO]; [self.window makeKeyAndVisible]; return YES; } - (void)playMusic:(NSTimer *)timer{ [

Using Core Data and in insertMethod App crashes and give NSInternalInconsistencyException with error message Context already has a coordinator

非 Y 不嫁゛ 提交于 2020-01-23 02:35:10
问题 i am implementing a core data example in xcode 4.2 at insertMethod (in MasterViewController.m class) my app crashes with a NSInternalInconsistencyException and error message: Context already has a coordinator; cannot replace. can any buddy tell me the meaning of this exception and error message insert method given below:- (void)insertNewObject { detailViewControllerObj = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil]; detailViewControllerObj.delegate = self;

Apple Push Message

强颜欢笑 提交于 2020-01-23 02:06:26
问题 I am integrating a Push Provider Server with the codes (php-apns) from google codes. Everything seems to be fine except the number of bytes per message. The number of bytes per payload should be maximum 256 characters. If some Chinse characters or UTF8 characters are sent. After JSON_enode, each character would occupy 6 bytes. Am I right ? So the maximum number of UTF8 characters in each push message is around 38. But ... Whatsapp (iPhone application) uses PUSH too, but it can push more

xcode showing warnings as errors

痴心易碎 提交于 2020-01-22 17:49:46
问题 I turned on the setting "Treat Warnings as Errors" used it for a while and then turned it off however warnings still build as errors. I have restarted xcode and my pc. 回答1: Try to override this setting on the Target level, rather than Project's. 来源: https://stackoverflow.com/questions/5100111/xcode-showing-warnings-as-errors

Continue task execution in background

删除回忆录丶 提交于 2020-01-22 16:26:05
问题 Am I missing something here with Multitasking feature. I know we can execute a task in background, but what I really need is that task continues execution when app goes in background. So what I need is different than starting a new task in background. If images are being loaded in a view and user presses the home button to make the app go in background, I want that images continue to load and when user makes the app active again, he can see all the loaded images. How can this be done? Thanks

Where is “upgrade target for ipad” in Xcode4

…衆ロ難τιáo~ 提交于 2020-01-22 10:47:45
问题 I'm running Build 4A304a and for the life of me I can't find it in Xcode or any reference to it on the internets. any help would be greatly appreciated. 回答1: Right-click the target and click Duplicate. Choose to Duplicate and Transition to iPad. 回答2: Select your project in the Project Navigator, click your target, and then click the Summary tab. You can switch your iOS Application Target there to Universal. Here's a screenshot: 来源: https://stackoverflow.com/questions/5355958/where-is-upgrade

XCode - IPhone Development Teams

99封情书 提交于 2020-01-22 02:18:06
问题 I have paid for IPhone dev license I have everything. But still when I want to "Add device to Provisioning portal" so that I can test the app on my own IPhone i get the following message: The indicated user is not on any iPhone Development Teams Any idea how I can solve this? 回答1: Did you download and install the team provisioning license from iTunes connect? It should be on your keychain. 回答2: You should follow through the guide lines given on APPLE. Try login to iOS dev center, and move to