ios5.1

Convert any timezone date in system timezone in iOS

岁酱吖の 提交于 2020-03-05 06:47:11
问题 I am facing problem while converting given date into system time zone in iOS. Source date: 2013-03-18 03:54:18 // its in AM format Destination date should be : 2013-03-18 03:30:15 //its in PM format. How can I get this?? I have tried below code but getting wrong data and difference too. NSDateFormatter *fmt = [[NSDateFormatter alloc] init]; fmt.dateFormat = @"yyyy-MM-dd HH:mm:ss"; NSLog(@"Post date::%@",postDate); NSDate *utc = [fmt dateFromString:postDate]; fmt.timeZone = [NSTimeZone

How to show selected date on button using datepicker?

北战南征 提交于 2020-01-06 20:07:53
问题 when i click on my button am able to show date picker sucessfully.But when i am selecting date from the date picker I am unble to show the selected date on UIbutton . plz help me Here is my code: -(IBAction)btnDateClicked:(id)sender { UIActionSheet *actionSheet1 = [[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil]; [actionSheet1 setActionSheetStyle:UIActionSheetStyleBlackTranslucent]; CGRect pickerFrame = CGRectMake(0,

Custom MPVolumeView Thumb Image not vertically centered since iOS 5.1

会有一股神秘感。 提交于 2020-01-01 09:18:14
问题 I'm building an application that needs an MPVolumeView to control the volume. It worked perfectly before iOS 5.1 but since the 5.1 update the thumb image is no longer vertically centered. I tried a few things like changing imagine dimensions, resizing my views (and slider) but nothing seems to work, the thumb is just not vertically centered anymore. The only way i get a centered thumb is if i use the default iOS one. I tried adding a UISlider to another view with the exact min, max and thumb

iOS: Image get rotated 90 degree after saved as PNG representation data

♀尐吖头ヾ 提交于 2019-12-27 12:20:08
问题 I have researched enough to get this working but not able to fix it. After taking picture from camera as long as I have image stored as UIImage, it's fine but as soon as I stored this image as PNG representation, its get rotated 90 degree. Following is my code and all things I tried: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSString *mediaType = [info valueForKey:UIImagePickerControllerMediaType]; if([mediaType

Using a webview to play an mp3- is it possible to keep it playing even when the screen is locked?

谁都会走 提交于 2019-12-25 00:18:05
问题 I have a portion of my app that simply launches a webview linked to an mp3 file- it opens the file and plays the audio. What I'd like to do is allow that audio to continue playing even if the user locks their iPhone. (As a side note, is there any way to replace the default Quicktime logo that appears in the player? Not that big a deal, just thought I'd ask =) A third question- I also do the same thing (webview) with an .m3u linked file to stream live audio throughout the week- is it also

How to set value for NSString in another view controller from one viewcontroller

隐身守侯 提交于 2019-12-24 19:26:32
问题 I'm using Xcode 4.3.2 & iOS 5.1 simulator, and in my project I am using two View Controllers: testingViewController, and detailView. I want to set values for an NSString in detailView once I didSelect tableViewCell in testingViewController. For that i used following code: testingViewController.h testingViewController.m detailView.h detailView.m I get null values for both wordName and wordMeaning in the console. Anyone have a solution? Thanks in Advance! 回答1: If you have a storyboard segue

Setting UIToolbar background image with iOS5.1

半世苍凉 提交于 2019-12-24 03:28:25
问题 I used the following code to set the image "Sample" as a background color of my UIToolbar self.toolbar.layer.contents = (id)[UIImage imageNamed:@"Sample.png"].CGImage; But it seems the above one does not works with iOS5.1 and the default background color of UIToolbar appeared. I doesn't have any problem with this line in iOS4. Am I missing something? Please suggest me the reason.. Thanks 回答1: // Create resizable images UIImage *gradientImage44 = [[UIImage imageNamed:@"imageName.png"]

iOS GoogleMaps SDK error: “[__NSCFDictionary objectForKeyedSubscript:]: Unrecognized selector sent”

你说的曾经没有我的故事 提交于 2019-12-23 22:25:38
问题 I follow every step in getting started with google maps for ios, I did everything ok but in every example that I try, the emulator start asking if I want turn on the GPS and after that, it throws the error: 2013-03-07 16:05:09.135 Cicerone4all[352:14e03] Google Maps SDK for iOS version: 1.1.0.2080 2013-03-07 16:05:09.750 Cicerone4all[352:10d03] -[__NSCFDictionary objectForKeyedSubscript:]: unrecognized selector sent to instance 0xcac9b40 2013-03-07 16:05:09.755 Cicerone4all[352:10d03] ***

Xcode and iOS5.1 on iPhone won't work

天涯浪子 提交于 2019-12-23 11:24:09
问题 Did I miss something? I updated my iPhone to 5.1 and now Xcode won't install developer apps on it. Here's from the Organizer: OS Installed on User's iPhone 5.1 (9B179) Xcode Supported iOS Versions Latest 5.0 (9A334) 4.3 4.2 回答1: The current Xcode doesn't have the latest iOS 5.1 SDK (not to mention it looks like Apple took down the beta builds). You'll have to wait until Apple updates Xcode. 回答2: You have to download Xcode 4.3.1, but they try to force it through the app store and a lot of

How to compile expat with iOS SDK 5.1?

坚强是说给别人听的谎言 提交于 2019-12-22 18:14:09
问题 How to compile expat with iOS SDK 5.1? I tried to adapt/upgrade from all older scripts, but nothing worked... Could anybody do it already? 回答1: I found it! I used the following script: https://github.com/x2on/expat-ios The problem is that the command "xcode-select -print-path", used in the compilation script, is showing "/Developer" instead of the correct full path including "/Applications/Xcode.app/Contents/Developer". I just changed it and then it worked! The last XCode [SDK 5.1] moved the