iphone-sdk-3.0

how to show the same view when the app is reopened

戏子无情 提交于 2019-12-05 19:26:42
I have a tableview which shows a webview on clicking some row in the table, which in turn picks up the data from an sqlite. if a user closes the app by pressing home key while viewing a description in webview and reopens it after sometimes, I should be making the user to see the same screen. how to show the same view again ? What is the efficient way ? Well I think the easiest way is to store the state of the application in NSUserDefaults. There is a delegate method on UIApplication called: - (void)applicationWillTerminate:(UIApplication *)application This delegate method gets called when the

Nesting Custom Classes/XIB's with Interface Builder

心已入冬 提交于 2019-12-05 18:58:51
问题 I'll try to make this as short as I can. I wrote a custom class that extends UIView with a couple of IBOutlet properties, and it has a XIB associated with it where those IBOutlets are linked to. I then want to take that class, embed it in some other XIB (for example, a table cell), and just have it work. It seems that when I embed that custom class in the new XIB, it does not recognize the original XIB I associated with it, so it asks for me to reset the IBOutlets to interface elements on the

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

橙三吉。 提交于 2019-12-05 17:20:47
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. thanks. From the MPMoviePlayerController docs: Supported Formats This class supports any movie or audio

How to make custom TableViewCell with initWithStyle after 3.0

那年仲夏 提交于 2019-12-05 15:54:52
I am trying to have custom TableViewCell with initWithStyle, since it says initWithFrame is deprecated after 3.0. Everything worked fine with initWithFrame before. Is there any tutorials or sample code available for this? Thanks. I have subclassed UITableViewCell then override the initWithStyle method. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { self.selectionStyle = UITableViewCellSelectionStyleNone; // Initialization code msgText = [[UILabel alloc] init]; [self

UIGraphicsBeginImageContext with parameters

南楼画角 提交于 2019-12-05 15:05:14
问题 I am taking a screenshot in my application. I am able to take the screenshot. Now I want to take the screenshot by specifying the x and y coordinate. Is that possible? UIGraphicsBeginImageContext( self.view.bounds.size ); [self.view.layer renderInContext:UIGraphicsGetCurrentContext( )]; UIImage* aImage = UIGraphicsGetImageFromCurrentImageContext( ); 回答1: UIGraphicsBeginImageContext(self.view.bounds.size); CGContextRef c = UIGraphicsGetCurrentContext(); CGContextTranslateCTM(c, 0, -40); // <--

Audio will play in 3.2 sim but not in 4.x

送分小仙女□ 提交于 2019-12-05 14:15:21
This streaming audio app will play in 3.2 simulator, but not in 4.x sim or my 4.1 iPhone. The console logs are as follows: 4.0 Sim This GDB was configured as "x86_64-apple-darwin".Attaching to process 13237. [Switching to process 13237] 2010-11-15 19:54:49.606 Issues[13237:1c07] AddRunningClient starting device on non-zero client count 2010-11-15 19:55:16.220 Issues[13237:6307] AQMEIO_Base::DoStartIO: timeout 2010-11-15 19:55:16.498 Issues[13237:6307] AQMEDevice::StartIO: error -66681 2010-11-15 19:55:16.499 Issues[13237:6307] CA_UISoundClientBase::StartPlaying: AddRunningClient failed (status

Core Data Store Sharing between iPhone Apps

时间秒杀一切 提交于 2019-12-05 14:11:31
Is it possible to share a core data store between two different iPhone apps signed by the same developer? I would like to develop an application where one iPhone app will save a stream of data, which can then be read by the other app. Is this even possible? Thanks a lot! No, that's not possible. An iPhone application runs in a sandbox and though doesn't have access to another applications data store. Edit: After reading the others answers here: Yes, Custom URLs are possible. And yes it's possible to transfer data with it, but, I, in my opinion, wouldn't recommend this procedure to transfer

How to make a UIView that can cover the navigation bar?

我只是一个虾纸丫 提交于 2019-12-05 13:37:22
问题 I want to show the UIView in full screen, but show the status bar, other things, like the navigation bar need to cover by the UIView . How can I do that ? 回答1: Struggling a little to fully understand the question, but I think you're asking how you can display a UIView above another view (so that the view with the navigation controls is completely hidden by the second view)? UIViewController has: - (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated

Taking the highlight off of Icons

泄露秘密 提交于 2019-12-05 12:34:26
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! from http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html : If you choose, you can prevent iPhone OS from adding the shine to your icon. To do this, you need to add the UIPrerenderedIcon key to your application’s Info

How to prevent keyboard changing from Numbers to Alphabet when the space key is touched?

无人久伴 提交于 2019-12-05 11:09:09
I have UITextFields on a table to enter values. Some of these fields accept only numbers. I am using UIKeyboardTypeNumbersAndPunctuation for the keyboardType, and shouldChangeCharactersInRange to filter the characters. Also, all the corrections are disabled: textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; textField.autocorrectionType = UITextAutocorrectionTypeNo; textField.autocapitalizationType = UITextAutocapitalizationTypeNone; On the numeric only fields, when the space key is touched, the keyboard changes to Alphabet. I know that this is the default behavior. I want to ignore