ios4

Programmatically control iPhone OS versions to enable functions for both OS 3.x and 4 - MFMessageComposeViewController problem

我只是一个虾纸丫 提交于 2020-01-12 03:42:11
问题 In order to support iPhone OS 3.x and 4.0 I programmatically control MFMessageComposeViewController functionality like this (use it only if the OS version is 4.0 or above): // if iPhone OS version >= 4.0 if (os_version_num >= 4) { MFMessageComposeViewController *controller = [[MFMessageComposeViewController alloc] init]; if([MFMessageComposeViewController canSendText]) { controller.body = text; controller.recipients = [NSArray arrayWithObjects: nil]; controller.messageComposeDelegate = self;

How to create high-resolution iphone launch image?

倖福魔咒の 提交于 2020-01-12 03:21:12
问题 As per the Apple iPhone Human Interface Guidelines I have created a Default.png image which is displayed while waiting for the application to load. I created the image using the xcode organizer 'capture screenshot' feature. I am now preparing my application for the iphone 4 high resolution screen and am wondering how to create the high resolution version of Default.png. Is there a way to generate it from a screen shot like the standard Default.png image? 回答1: The easiest way I found is to use

How to create high-resolution iphone launch image?

北城以北 提交于 2020-01-12 03:21:08
问题 As per the Apple iPhone Human Interface Guidelines I have created a Default.png image which is displayed while waiting for the application to load. I created the image using the xcode organizer 'capture screenshot' feature. I am now preparing my application for the iphone 4 high resolution screen and am wondering how to create the high resolution version of Default.png. Is there a way to generate it from a screen shot like the standard Default.png image? 回答1: The easiest way I found is to use

Cropping videos in iOS

人盡茶涼 提交于 2020-01-12 03:21:08
问题 We can crop images. Can we crop videos? 回答1: Since video is a collection of pictures you can crop all frames from video and after create new video. AVFoundation guide describe some tasks: Putting it all Together: Capturing Video Frames as UIImage Objects After this you crops images and write video You can use an asset writer to produce a QuickTime movie file or an MPEG-4 file from media such as sample buffers or still images. See for more details AV Foundation Framework 回答2: [[NSFileManager

Cropping videos in iOS

百般思念 提交于 2020-01-12 03:21:07
问题 We can crop images. Can we crop videos? 回答1: Since video is a collection of pictures you can crop all frames from video and after create new video. AVFoundation guide describe some tasks: Putting it all Together: Capturing Video Frames as UIImage Objects After this you crops images and write video You can use an asset writer to produce a QuickTime movie file or an MPEG-4 file from media such as sample buffers or still images. See for more details AV Foundation Framework 回答2: [[NSFileManager

Why MFMailComposer with <img> is not showing the image in mail?

余生颓废 提交于 2020-01-11 19:59:21
问题 I am sending some images in mail using MFMailComposer . I am converting the image to Base64 and using <img> tag to add images to the HTML body(I am not adding it as attachment ). [htmlString appendFormat: @"<img src='data:image/png;base64,%@' width=300 height=200 />", imageAsBase64]; The images are displaying correctly in MFMailComposer , but there are no images displayed in the actual mail which is sent from the MFMailComposer. What should I do to make it work? 回答1: I had same problem before

How do I create a multiline table cell in iOS?

橙三吉。 提交于 2020-01-11 19:56:25
问题 How can I get the second cell to expand to fit the text rather than scaling the text? Is there a built in way of doing this in iOS or will I have to come up with some home-cooked solution? If you look in the iOS Contacts application, there's a box like this for Address. I can't find how to implement this though. For anyone looking to achieve this in future, here's the code for my solution: HEADER file: #define FONT_SIZE 22.0f #define CELL_CONTENT_WIDTH 320.0f #define CELL_CONTENT_MARGIN 5.0f

How do I create a multiline table cell in iOS?

流过昼夜 提交于 2020-01-11 19:56:13
问题 How can I get the second cell to expand to fit the text rather than scaling the text? Is there a built in way of doing this in iOS or will I have to come up with some home-cooked solution? If you look in the iOS Contacts application, there's a box like this for Address. I can't find how to implement this though. For anyone looking to achieve this in future, here's the code for my solution: HEADER file: #define FONT_SIZE 22.0f #define CELL_CONTENT_WIDTH 320.0f #define CELL_CONTENT_MARGIN 5.0f

NSXMLParser retrieving wrong data from XML tags

孤人 提交于 2020-01-11 11:32:34
问题 I am reading a xml with some fields, for example: <url>http://myurl.com/noticias/redirect.html?document=xx222&usuario=44yyy&url=http%3A%2F%2Fwww.environmental-expert.com%2FresultEachPressRelease.aspx%3Fcid%3D23745%26codi%3D234441%26lr%3D1</url> <title>The world water report – supplies falling, Tensions Rising</title> And the output is: 2011-04-28 17:08:02.191 MyProject[12093:207] doc found 2011-04-28 17:08:02.192 MyProject[12093:207] url=http%3A%2F%2Fwww.environmental-expert.com

NSXMLParser retrieving wrong data from XML tags

自古美人都是妖i 提交于 2020-01-11 11:31:27
问题 I am reading a xml with some fields, for example: <url>http://myurl.com/noticias/redirect.html?document=xx222&usuario=44yyy&url=http%3A%2F%2Fwww.environmental-expert.com%2FresultEachPressRelease.aspx%3Fcid%3D23745%26codi%3D234441%26lr%3D1</url> <title>The world water report – supplies falling, Tensions Rising</title> And the output is: 2011-04-28 17:08:02.191 MyProject[12093:207] doc found 2011-04-28 17:08:02.192 MyProject[12093:207] url=http%3A%2F%2Fwww.environmental-expert.com