iphone-sdk-3.0

What are the video formats supported by MPMoviePlayerController on the iPad?

落爺英雄遲暮 提交于 2019-12-22 08:40:17
问题 When you use iTunes to sync your videos with the iPhone the videos are always saved with no more than 640 pixels wide, if I am not wrong. What about the iPad? What is the size of videos iTunes syncs with iPad? 1024x768? and what if the video has a dimension below 1024x768? Will it scale up? or will it keep the video at low res and scale when you play? The question is because I am using the MPMoviePlayerController and I need to know what resolutions to expect, so I can adjust the interface.

Taking the highlight off of Icons

余生颓废 提交于 2019-12-22 06:57:29
问题 When programming and looking at all different apps I have realized that some apps in the app store don't have the lit highlight on the top, making it look more 3D. I have an app idea but I need to take the highlight off. The app have been programmed in Xcode, so if anyone answers, that would be great. Thanks! 回答1: from http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html : If you choose, you can prevent iPhone OS from adding

UIView subclass draws background despite completely empty drawRect: - why?

ぐ巨炮叔叔 提交于 2019-12-22 03:54:11
问题 So, I have a custom UIView subclass which enables drawing of rounded edges. The thing draws perfectly, however the background always fills the whole bounds, despite clipping to a path first. The border also draws above the rectangular background, despite the fact that I draw the border in drawRect: before the background. So I removed the whole content of drawRect:, which is now virtually empty - nevertheless the background gets drawn! Anybody an explanation for this? I set the backgroundColor

Refreshing XML data and updating a UITableView

拥有回忆 提交于 2019-12-22 01:32:16
问题 I'm developing an iPhone application which uses a TableView to display XML data. The XML data comes from an external resource and is parsed and put into an object for use as a table dataSource. The application uses a UITabBar and multiple ViewControllers all programmatically created and using the same dataSource. Everything is fine and dandy, but I'd like to implement a refresh button, so that a user can refresh the content (globally, so all the ViewControllers should be updated). The parser

How to detect space, and special characters like :, ?,`,~, etc in text of a textfield in iPhone SDK?

自闭症网瘾萝莉.ら 提交于 2019-12-22 01:17:25
问题 How to detect space, and special characters like :, ?,`,~, etc in text of a textfield in iPhone SDK? 回答1: Try this.. NSCharacterSet* symbols = [NSCharacterSet symbolCharacterSet]; if([symbols characterIsMember: yourCharacter]) { //Check Your condition here } If you want to include many characters Use a combined NSCharacterset with NSMutableCharacterSet.. NSMutableCharacterSet *space = [NSMutableCharacterSet characterSetWithCharactersInString:@" "]; [space formUnionWithCharacterSet:

How to animate UIButton background color

坚强是说给别人听的谎言 提交于 2019-12-22 00:17:41
问题 I want to change the UIButton background color from black to white color. But I want to change it in animation. For example... black > grey > white. Is there any simple way to do so in iPhone SDK? thank you. 回答1: UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 300, 50)]; [button setTitle:@"hi" forState:UIControlStateNormal]; [button setBackgroundColor:[UIColor blackColor]]; [self.view addSubview:button]; [UIView beginAnimations:nil context:nil]; [UIView

Objective-C : UIScrollView manual paging

跟風遠走 提交于 2019-12-21 23:08:13
问题 I want to use the scrollview as something like a picker in horizontal mode. The scrollview holds up to seven subviews. Each subview represents a value. Always three views are visible and the one in the middle is the selected one. Scrollview visible at start: __ | V1 | V2 Scrollview set to view/value two: V1 | V2 | V3 Scrollview set to last value: V2 | V3 | __ The real problem I have got is the "pagingEnabled" flag. If pagingEnabled is set to YES the scrollview pages always three subviews

iPhone App Pick Up Sound

别来无恙 提交于 2019-12-21 22:31:49
问题 I am trying to do a certain action based on whether or not the user makes a loud sound. I'm not trying to do any voice recognition or anything. Just simply do an action based on whether the iPhone picks up a loud sound. Any suggestions, tutorials, I can't find anything on the apple developer site. I'm assuming i'm not looking or searching right. 回答1: The easiest thing for you do is to use the AudioQueue services. Here's the manual: Apple AQ manual Basically, look for any example code that

How to get to “Manage Subscriptions” from my app

元气小坏坏 提交于 2019-12-21 21:39:41
问题 Is there any method to get to Manage Subscriptions in settings by clicking a button from my app?? 回答1: There is no way to access the settings app from inside a sandboxed app -- i.e. any apps but Apple's -- without using a private API. 回答2: you can open Subscription section of AppStore by opening this link in iphone/ipad safari: https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/manageSubscriptions or simply use this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@

Send image and text in email from within app

こ雲淡風輕ζ 提交于 2019-12-21 21:25:17
问题 How can I send an image along with text, which is in the form of tabular data, in an email from within my app? Please help and make suggestions. Thanks. 回答1: - (void)sendMailWithImage:(UIImage *)image { if([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init]; if(mailController!=nil) { mailController.mailComposeDelegate = self; NSData *imageData = UIImagePNGRepresentation(image); [mailController addAttachmentData