- (void)someMethod {
if ( [delegate respondsToSelector:@selector(operationShouldProceed)] ) {
if ( [delegate operationShouldProceed] ) {
// do something appropriate
}
}
}
http://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithOb...
I use an NSXMLParser to parse YouTube's API and I get all the content I want and put it into a class called Video. When I am writing to the class from inside parserDidEndElement and I end that video I write the class to an NSMutableArray. Then I NSLog the title of the video that was logged into the array. This is different for each video...
Is it safe to call dismissModalViewControllerAnimated within a modal view? or should it be called from the controller that initiated the modal view? If so how would I program that?
...
Is there a build preprocessor I can use, like #if or #ifdef to check whether my current xcode project is being built for iphone or ipad?
...
Hi,
My app is currently in version 3.2.3. What version of iOs apps are currently being accepted by Apple. Links?
...
- (id)initWithDelegate:(id)delegate
{
self = [super init];
if (self)
{
_delegate = delegate;
}
return self;
}
Is it generally recommended to pass in the delegate in the init method? what about in another method that will be called first?
Also do I need to set _delegate to nil or release in the dealloc or v...
Hi
I have a UITextView that takes an NSString with formating stringWithUTF8String. It is getting its values from a database and I want the text in the database to be rendered with breaks within the text. I tried using "\n" to do this but it gets rendered as text. Doing this in my information page of the app as straight text worked but I...
Hello
I got a UIViewController implementing UINavigationControllerDelegate and when i try to add UIActionSheetDelegate , it gives exception "NSInvalidArgumentException"
Here is my code:
RootViewController.h
@interface RootViewController : UIViewController <UINavigationControllerDelegate,UIActionSheetDelegate> {
}
-(IBAction) openAct...
I have a UITableViewCell setup and i'd like to add a graphic on the right hand side with a number inside it (similar to the way mail shows how many new mail messages you have)
So the UITableViewCell would look something like this;
Is there a simple way to do this? Many thanks.
...
I've been looking at many code samples on the internet.
If I add an UIWebView from interface builder as an IBOutlet.
Is it right that in the dealloc method of the controller, I need to do the following?
[webView stopLoading];
webView.delegate = nil;
[webView release];
and what about in the viewDidUnload method?
...
UIViewController *newView = [[UIViewController alloc] initWithNibName:@"NewView" bundle:[NSBundle mainBundle]];
tabBarController.selectedViewController = newView;
Why doesn't this work?
...
When I have a CoreData entity named, say, 'Book', which has a one-to-one relationship with another entity ('Bookmark') would I need to insert both an instance of 'Book' and an instance of 'Bookmark' into a managed object context, and manually assign the relationship?
If I perform the following code to instantiate an instance of 'Book'.....
Hello everyone,
I am trying to rotate my MPMoviePlayerController to landscape view, but it always stays in portrait mode. I am doing this in a UIViewController and I still can't rotate my MPMoviePlayerController when I am in full screen mode. Do I have to do something to the shouldAutorotatetoOrientation method? If anyone knows how to d...
How do I take a NSObject that I have set all the attributes of and then copy that into another block of memory that an array can use so I can re use the original one?
...
Hey everybody, I have a drum app that I've created basing it off of AVAudioPlayer instead of the common system sounds in order to have a bit of control.
The problem is that whenever 2/more sounds are played at once, it lags and stops alls sounds, so your drum beat gets choppy and randomly stopped.
like boom boom chhhhh boom boom ch--- ...
It seems that there is no admin page in Game Center.
Is there any way to delete scores on leaderboards?
...
i am loading several images based on when user click any row -> section ->images
i am parsing via NSxmlparser
now point is i can only go to detail section if all of my images loaded which is too time consuming
is there any way that allow me to go to section view(even if 1 image loaded) and then keep loading rest images later
this is m...
I dream of being able to use Illustrator to create my vectorial objects and export them as quartz paths. Is that possible?
It needs to be as Quartz paths because I would like to be able to fill the paths with colors, gradients, etc.
How do I do that? Is there a way to export (?) from illustrator or such apps and import paths on Xcode t...
So I'm making a universal app (iphone3gs/iphone4/ipad/)... But I have a question about images.
Say we have an image of a smiley face...
Would you have 3 separate images (each saved with a different width/heights)
for all devices i.e.:
smiley-iPad.png (for ipad)
smiley.png (for iphone 3gs)
[email protected] (for iphone 4)
or would you j...
I have a table cell to which I'm adding subviews programmatically. All the textual subviews work fine, but I can't get an image subview working at all.
You'll notice that I set the background color to black. This is simply to indicate to me that the subview is indeed being initialized and positioned properly within the cell. When I remo...