ios4

Getting image name of iphone photo library

╄→尐↘猪︶ㄣ 提交于 2020-01-21 06:13:34
问题 I'm doing a project to take images from iphone photo library or in other way from camera roll. I have done that without any problem. But i need to retrieve the name from the photo library. Is there a way to do that? Any help is appreciated Thanks 回答1: Have a look at ALAssetsLibrary which is available in iOS 4.0 and later. Also, these links may help How to get a photo's original filename in iOS? iPhone: How do I get the file path of an image saved with UIImageWriteToSavedPhotosAlbum()? 回答2: If

How do I create custom text macros in Xcode 4?

夙愿已清 提交于 2020-01-21 05:05:29
问题 I updated to Xcode 4 today and my custom text macros are no longer working. I cannot find any information on how to use custom macros with Xcode 4. Is this still possible? Please let me know if anyone has come up with a solution. This is the directory where I currently have my 'ObjectiveC.xctxtmacro' file. ~/Library/Application Support/Developer/Shared/Xcode/Specifications 回答1: The format of how Text Macros are defined, and where they live has changed - Text Macros have morphed into Code

How do you activate multisampling in OpenGL ES on the iPhone?

筅森魡賤 提交于 2020-01-20 02:28:30
问题 I'm experimenting w/ improving the "resolution" of an OpenGL ES based app. Apple mentions here (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling... and this can improve the graphics somewhat. How do you enable multisampling? 回答1: The WWDC session 415 video goes over this a bit, so grab and watch that if you can. Essentially, you create a second framebuffer for msaa rendering using glRenderbufferStorageMultisampleAPPLE for its depth and color buffers. Then you bind this

MKOverlay not resizing smoothly

你。 提交于 2020-01-19 23:22:44
问题 I have added a MKCircle as MKOverlay to my MKMapView. Also I added an UISlider to decide the radius of the circle. Unfortunately when using this it seems a bit "laggy", not smootly like I want it to be. Example: http://dl.dropbox.com/u/3077127/mkoverlayDelay.mov This is my code: - (void)addCircle { // draw the radius circle for the marker double radius = 2000.0; MKCircle *circle = [MKCircle circleWithCenterCoordinate:location radius:radius]; [circle setTitle:@"background"]; [mapView

bootstrap server. Error in iPhone SDK

橙三吉。 提交于 2020-01-17 08:32:18
问题 Can anyone help for the following ERROR: Couldn't register com.india.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. here m using xcode 4.1 and i have same project folders in my local desk. When ever i open multiple projects with the same name its showing the above error. Thanks in advance. 回答1: Some of the fixes that the links Saif contain may work for some, but not for me. I

How to make it so when the view loads, it displays something based on the value of an NSInteger?

♀尐吖头ヾ 提交于 2020-01-17 06:56:33
问题 I am making a quiz app that displays a saying at the end of the quiz based on the value of the NSInteger myScore. How would I code this? Any help would be helpful 'haha'. Thanks! 回答1: Use an array that stores your witty remarks, and calculate an array index out of the score. Something like this: NSArray *wittyNotes = [NSArray arrayWithObjects: NSLocalizedString(@"Foo", nil), // 0 - 99 NSLocalizedString(@"Bar", nil), // 100 - 199 NSLocalizedString(@"Baz", nil), // 200 - 299 NSLocalizedString(@

Showing FlipviewController crash in XCode 4 debugger

若如初见. 提交于 2020-01-17 04:12:26
问题 My app has 2 views that are shown as flipview when a button is pressed. They are working just fine on any testdevice. But in XCode, one of them is causing a crash (bad_exec) to the return of the main method when he is displayed. The crash happens outside of any of my functions. Ok, bad_exec means, I have anything that is trashing/deallocating or corrupting the memory. But why does it just happen in the iPhone 4.2 simulator under xcode 4? No Zombies do fire, nor do I overwrite/deallocate

[ self presentModalViewController: controller animated: YES ]; Behaves strangely

徘徊边缘 提交于 2020-01-17 01:24:11
问题 I have an Universal App that supports all orientations in iPad and only potrait in iPhone / iPod. My code looks somewhat like this: @implementation UIViewController ( interfaceOrientationHack ) - (void) shouldAutorotateToInterfaceOrientation: ( UIInterfaceOrientation ) toInterfaceOrientation { if( iPad ) { return YES; } else if( toInterfaceOrientation == UIInterfaceOrientationPotrait ) { return YES; } else return NO; } @end From one of my controllers, i launch a navigation controller as modal

Detect when volume button is pressed

倾然丶 夕夏残阳落幕 提交于 2020-01-17 01:19:15
问题 I've done lots of research and I know that Apple will not allow this but does anyone have code or can someone point me to code that enables me to detect when a user presses either the up or down volume button on the iphone? I need to be able to detect which one is pressed (up or down). I will not be submitting anything to apple that has this code. I am just wondering if possible? Thanks in advance. 回答1: you can do it-- look at these -- program access to iPhone volume buttons iPhone SDK 4 -

Invoking Web Method Using iOS

柔情痞子 提交于 2020-01-16 18:35:13
问题 I am trying to invoke a web method "Greet" which takes multiple arguments as shown below: [WebMethod] public string Greet(string deviceToken,string userName) { // do something return "Hello World"; } And here is my iOS code to invoke the service. When I invoke I always get "Internal Error 500". -(IBAction)submitButtonClicked:(id)sender { // call the web service //21212d6fefebde4d317cab41afff65631b5a4d47e5d85da305ec610b4013e616; NSURL *url = [NSURL URLWithString:@"http://www.azamsharp.com