iphone

Importance of drawRect, layoutSubViews and setNeedsDisplay methods.

What is the importance of drawRect, layoutSubViews and setNeedsDisplay methods. In which contexts we should use them? ...

Release controller, but keep empty pointer?

I have a variable, editForm, that is used as a pointer to a view controller. Later on, I use a delegate method to release editForm when the user taps the button to close the view. @implementation EditViewController EditFormViewController *editForm; [...] (void)openeditform:(NSString*)editId { editForm = [[EditFormViewController ...

Issue while implementing MVC

Hi, I am facing an issue while implementing MVC. I created a UIView subclass and have designed my custom view. I created a UIViewController subclass and pointed its view to my custom view class. Finally I created a NSObject subclass and created a model for my controller. When i am running the app, i am getting a black screen... Any idea ...

how to call object from one class to another class

hi i am new to iphone. what i did is creating two classes named view1 view2. And i create a button in view1. now what i need is when ever i click the button in view one it goes to viewdidload in view2 how can i done this pls post some code or link. thank u ...

Check whether a zip file is protected by password in Objective-C/iPhone?

Hello friends, I'm using lib ZipArchive to unzip file on iPhone, it works pretty well, however I met a issue about checking if a zip file is protected by password. I'm wondering if there's a function to check whether a zip file is protected by password before unzipping, but I didn't get lucky to find an api for that. So does anyone wh...

How to get status bar images in iPhone APP

I want to get status bar images without UIGetScreenImage() because this method is Private API. Apple recommend http://developer.apple.com/iphone/library/qa/qa2010/qa1703.html as a alternate solution, but this way can't get status bar images. Would like to know how to get status bar images? ...

How to change connection from 3G to wi-fi programmatically using iPhone SDK?

Lets consider that I am connected to internet through 3G in my App. When a wi-fi hot spot seems to be appearing, can I programmatically switch to the wi-fi. Is this vice-versa condition possible? ...

Is It Possible To Record All Outgoing Audio On An iPhone?

Ok, so I have an MPMoviePlayer playing a live-streamed audio file. I'm pretty sure I can't record the audio from that, so I was thinking it would be easier to attach a callback to the outgoing audio queue. Can anyone offer help on that, or set me straight if it's possible to GET data from the MPMoviePlayer as it's being streamed? ...

How to implement multiple UIView classes in single UIViewController

Hi, In my viewbased application i loaded oneview as mainview and another view as subview of mainview. Its work well the code snippet is , In mainviewcontroller, IBOutlet UIView *subView; @property(nonatomic,retain) UIView *subView; @synthesize subView; [subView release]; //add subview [self.view addSubview:subView]; //removefroms...

Audio file and progress bar

Hi everyone, I am trying to design an audio player. I need help regarding the progress bar. I want the status of progress bar to change as the audio progresses. I want progress bar to pause as I press Pause button and start again as I press start button. Please help... Thanks in advance... ...

Trying to track down a memory leak in a cocos2D application.

I am trying to track down a memory leak in my cocos2D game. I have run the game using instruments to find what is causing the leaks and the bulk of the problem seems to come from this method. -(void)setColour:(int)c { switch (c) { case RED: images[SMALL_BUBBLE_IMAGE] = [[CCTexture2D alloc] initWithImage:[UIImage imageNamed...

Can viewDidAppear:animated method be called multiple times for a single presentModalViewController:animated ?

I have a view hierarchy like this: nav1 (UINavigationController, top level object in nib) view1 (UIViewController) nav2 (UINavigationController, top level object in nib) view2 (UIViewController) I called nav2's view[Will/Did][Appear/Disappear] methods in view1's each method. and when I'm calling presentModalViewControlle...

cameraOverlayView to crop the result in UIImagePickerController

When I use UIImagePickerController with cameraOverlayView, can I get the only a selective region from my overlay view? ...

Can I directly access MySQL from iPhone using MYSQL API ?

I have developed an iPhone application which needs to access MySQL database on the server. It builds very well on 'iPhone simulator',but when I want to build 'Device' version, it fails with error messages bolow: ld: warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file was built for i386 which is not the architecture being linked ...

How to set tag to a button?

I am using [button.tag] = 50; But it is not working. I want to set tag to buttons. ...

How can I take my iphone app off sale temporarily from app store?

Hi, How can I take my iphone app off sale temporarily from app store? Thanks ...

How to Format the Date in Matrix Form in iPhone

Hi Developers, I'm having Some fixed list of Dates.I want to show that dates in a matrix Format. How can i do that..? Need your help..... ...

Passing variables from one view to an other .

Hello, I know this question as been asked over and over but it's still quite obscure to me, so I guess making an example with my code instead will probably be easier . I know that you can use : A global variable, ( not good practice ). Use a delegate Use a singleton Say I've got this piece of code here in my first view controller h...

AVAudio freezes AVFoundation Stream. help

i modified the AVfoundation sample code from WWDC.. the stream is working great.. but when i play audio..using AVAudioPlayer the stream freezes. with out any error messages or anything here is the AVAdudioPlayer code.. audioPlayer = [[AVAudioPlayer alloc] initWithData:data error:&error]; audioPlayer.numberOfLoops = 0; if (audioP...

example of linked list storing and retreiving through NSUserDefault class

I have 1 Linked list object and i want to use that object as for storing and retriving through any class for state maintainance in objective-c. Is there any example for that??? ...