iphone-sdk-3.0

How do you prompt the user to rate your iphone app without waiting for them to delete the app?

戏子无情 提交于 2019-12-17 17:28:47
问题 I am referring to the popup window that asks the user to submit a review/rating. I know it can be done since the Aardark app does it...it asks several times in fact! (Almost too spammy.) But there has to be an API to trigger the rating request? Google is giving me no love on this one. 回答1: I would check out the Appirater project that Arash Payan has put together. Pretty much handles the checking and displaying of the "rate my app" prompt, and brings the user right into the review portion of

How to know the apps installed in iPhone

纵饮孤独 提交于 2019-12-17 16:33:13
问题 I am developing an application in which i need to find the apps which are already installed in iphone device such as Skype, facebook. I need to check it. Please give me code snippet if possible otherwise a link to get the solution. Is it possible or not. If this is possible, then how to disable the app also... Thanks in advance...... 回答1: You can't check for any application, but you can actually check for applications which officialy shared their url scheme. You can find the biggest database

How to delete all Annotations on a MKMapView

怎甘沉沦 提交于 2019-12-17 15:26:38
问题 Is there a simple way to delete all the annotations on a map without iterating through all the displayed annotations in Objective-c? 回答1: Yes, here is how [mapView removeAnnotations:mapView.annotations] However the previous line of code will remove all map annotations "PINS" from the map, including the user location pin "Blue Pin". To remove all map annotations and keep the user location pin on the map, there are two possible ways to do that Example 1, retain the user location annotation,

Couldn't register with the bootstrap Server

て烟熏妆下的殇ゞ 提交于 2019-12-17 08:09:45
问题 I just changed some code in my program and got this error: Couldn't register com.yourcompany.XXX with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”. I tried restoring my program to a version that worked, rebooted, restarted, empty caches and rebuild on versions that even worked before. Any help would be appreciated. 回答1: I was able to recover from

MPMediaItems raw song data

孤人 提交于 2019-12-17 07:03:36
问题 I was wondering how to access an MPMediaItem's raw data. Any ideas? 回答1: you can obtain the media item's data in such way: -(void)mediaItemToData { // Implement in your project the media item picker MPMediaItem *curItem = musicPlayer.nowPlayingItem; NSURL *url = [curItem valueForProperty: MPMediaItemPropertyAssetURL]; AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL: url options:nil]; AVAssetExportSession *exporter = [[AVAssetExportSession alloc] initWithAsset: songAsset presetName:

Detect airplane mode on iOS

限于喜欢 提交于 2019-12-17 03:04:35
问题 How can I detect if the phone is in airplane mode? (It's not enough to detect there is no internet connection, I have to be able to distinguish these 2 cases) 回答1: Try using SCNetworkReachabilityGetFlags (SystemConfiguration framework). If the flags variable handed back is 0 and the return value is YES, airplane mode is turned on. Check out Apple's Reachability classes. 回答2: You can add the SBUsesNetwork boolean flag set to true in your Info.plist to display the popup used in Mail when in

How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS

久未见 提交于 2019-12-17 03:01:21
问题 I am trying to update my iPhone app to work with OS 3.0. I have a UIWebView that shows a page fine. But when I click a link it calls my delegate for didFailLoadWithError and the error is Operation could not be completed. (NSURLErrorDomain error -999.) I verified this is still working with OS 2.2.1, so it is something changed in 3.0. Any ideas? 回答1: I was able to find the answer here. This thread contained this description for this error: This error may occur if an another request is made

Is there a way to read data from a Non-Apple Bluetooth Device with the iPhone?

夙愿已清 提交于 2019-12-14 03:10:42
问题 I really searched on this topic for a while now. Especially when iOS 3 was the latest software version on the iPhone. I wonder if there is a possibility to connect the iPhone to an external device via Bluetooth using the SDK and retrieve measured data? Thanks for your help! Greeting! mary 回答1: If the Bluetooth device can masquerade as a Bluetooth keyboard, then it can send data to an iOS device encoded as keystrokes. If the Bluetooth device is or can masquerade as a headset, then it might be

setScrollsToTop with multiple UIScrollView classes and/or subclasses(UITableView)

China☆狼群 提交于 2019-12-13 15:26:39
问题 I know that setScrollsToTop gets confused when you have more than one scrollable view, but is there any way to fix this? Can you specify which view to scroll to top, thus clarifying it for the property? Eg, I have myScrollView and myTableView in the view How can I set it so only myTableView scrolls to top when the status bar is tapped? Alternatively, is there a notification that goes off (or I can subscribe too) when the status bar is tapped? Thanks in advance, I hope this makes sense! 回答1:

Custom Drawing of Alpha Images

泪湿孤枕 提交于 2019-12-13 15:23:58
问题 I am trying to do custom drawing of an image(with alpha) and eventually going to apply different color tints to it. Right now I am just trying to draw it correctly. This might be simple problem but the result is the ALPHA on my image is black. Image is .png created from photoshop with correct alpha. - (void) drawRect:(CGRect)area { [imgView.image drawInRect: area blendMode:blendMode alpha:alpha]; // draw image } blendMode is normal and alpha is 1.0. The image is good except alpha being black.