iphone-sdk-3.0

How do I determine if a coordinate is in the currently visible map region?

戏子无情 提交于 2019-12-18 03:01:30
问题 I have a list of several hundred locations and only want to display an MKPinAnnotation for those locations currently on the screen. The screen starts with the user's current location with a 2 mile radius. Of course, the user can scroll, and zoom on the screen. Right now, I wait for a map update event, and then loop through my location list, and check the coordinates like this: -(void)mapViewDidFinishLoadingMap:(MKMapView *)mapView { CGPoint point; CLLocationCoordinate2D coordinate; . . . /*

Change title of MFMailComposeViewController

大城市里の小女人 提交于 2019-12-18 02:29:10
问题 I'm using MFMailComposeViewController for in-app email in my app, but I'm not able to change the title. As default it's showing the subject in the title, but I would like to set the title to be something else. How can I do that? I've tried: controller.title = @"Feedback"; but it didn't work. Here's my code: - (IBAction)email { NSArray *array = [[NSArray alloc] initWithObjects:@"myemail@gmail.com", nil]; MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; [

Change title of MFMailComposeViewController

我只是一个虾纸丫 提交于 2019-12-18 02:28:59
问题 I'm using MFMailComposeViewController for in-app email in my app, but I'm not able to change the title. As default it's showing the subject in the title, but I would like to set the title to be something else. How can I do that? I've tried: controller.title = @"Feedback"; but it didn't work. Here's my code: - (IBAction)email { NSArray *array = [[NSArray alloc] initWithObjects:@"myemail@gmail.com", nil]; MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; [

show a login screen before Tab bar controller?

我们两清 提交于 2019-12-17 20:40:36
问题 i am designing an iphone application which should be display login screen initially, after that it should display tab bar controller with 5 tabs. Am able to launch login screen initially, but after that am unble to show tab bar controller, kindly help me out with the source code guys. here is my code: this is a view based application application.M -(void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview

How to remove red eye from image in iPhone?

最后都变了- 提交于 2019-12-17 20:28:05
问题 I want to remove red eye effect form photo but not get any sample can any one help me with working demo code or code snippet? Thanks. 回答1: Use below category of UIImage : @interface UIImage (Utitlities) -(UIImage*)redEyeCorrection; @end @implementation UIImage (Utitlities) -(UIImage*)redEyeCorrection { CIImage *ciImage = [[CIImage alloc] initWithCGImage:self.CGImage]; // Get the filters and apply them to the image NSArray* filters = [ciImage autoAdjustmentFiltersWithOptions:[NSDictionary

sound and Nstimer stopped when iphone is in deepsleepmode?

徘徊边缘 提交于 2019-12-17 19:31:31
问题 I am creating an application in which I'm using nstimer and avaudioplayer to play sound,but both sound and timer stops when phone is in deep sleep mode.how to solve this issue? here is the code to play audio -(void)PlayTickTickSound:(NSString*)SoundFileName { //Get the filename of the sound file: NSString *path = [NSString stringWithFormat:@"%@%@",[[NSBundle mainBundle] resourcePath],[NSString stringWithFormat:@"/%@",SoundFileName]];// @"/Tick.mp3"]; //Get a URL for the sound file NSURL

Problem dismissing multiple modal view controllers

末鹿安然 提交于 2019-12-17 18:37:34
问题 I am having trouble getting my modal view controllers to display properly. I have a parent view controller that is the delegate for modal view A . In modal view A I am presenting modal view B, and having the delegate dimiss modal view A. When modal view B appears it seems to display but the screen dims, and the UI locks up, but the app doesn't crash. I set animation settings to NO and I am still getting the same issue. Order of events: Parent View show Modal View A Modal View A shows Modal

Displaying ppt, doc, and xls in UIWebView doesn't work but pdf does

我们两清 提交于 2019-12-17 18:14:11
问题 It looks like a few people on stackoverflow get this to work but their code isn't posted. I'm using [web loadData:data MIMEType:MIMEType textEncodingName:@"UTF-8" baseURL:nil]; where MIMEType is: @"application/vnd.ms-powerpoint" @"application/vnd.ms-word" @"application/vnd.ms-excel" (BTW, I've seen DOC files use mimetype @"application/msword" but the "vnd" version seems more appropriate. I tried both just in case.) I verified that my 'data' is correct. PDF and TXT files work. When the

Having a UITabBar AND a UINavigationController in an app?

狂风中的少年 提交于 2019-12-17 18:04:28
问题 Hey everyone, I am new to iPhone development and I'm not understanding the whole UINavigationController and UITabBarController idea. Is one a substitute for the other - how do apps such as Tweetie combine both? I'd like to have my app have a persistent Tab Bar @ the bottom (which seems to be working), but also a Navigation bar at the top which can push/pop views onto the screen without removing the tab bar. How can I accomplish this? What should the hierarchy look like in IB as far as my

iPhone Simulator: SpringBoard failed to launch application with error: 7

假如想象 提交于 2019-12-17 17:42:16
问题 Building an iPhone project results in: Failed to launch simulated application: SpringBoard failed to launch application with error: 7 And the app doesn't install on the simulator. What's this all about? What's SpringBoard and what is error 7? 回答1: I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again. Worked. 回答2: Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error