cocoa-touch

problem with listener pattern using fast enumeration

Hey, right now I have implemented my own listener pattern. I will send an update to the listeners using fast enumeration. the code will look like this - (void) updateListeners { for (id<AProtocol>listener in _listeners) { [listener update]; } and in listener, i implement method for AProtocol, which is update. suppose there are n ob...

Removing subview for activity indicator

I have built a new view with an activity indicator attached, loading this nib, seems to be working fine on another view: - (void)viewDidLoad { [super viewDidLoad]; ProgressViewController *progresssView = [[ProgressViewController alloc] initWithNibName:@"ProgressViewController" bundle:nil]; [self.view addSubview:progresssVie...

Where does the image go when i take a screen shot?

On click event of a button [mybutton addTarget:self action:@selector(captureView) forControlEvents:UIControlEventTouchUpInside]; - (void)captureView { UIGraphicsBeginImageContext(CGSizeMake(320,480)); CGContextRef context = UIGraphicsGetCurrentContext(); [self.view.layer renderInContext:context]; UIImage *screenS...

How to handle exact UITouch of image?

I have an image for example triangle and place it inside UIImageView, and I have a touch and drag application, I can already drag the triangle but my problem is I can still drag the triangle even if I'm not actually touching the triangle, (Im touching the upper left of the triangle image) I think this is because the UIImageView itself is...

Thumb Nail Gallery?

Hi am curious how I would go about implementing a view like (See below) Similar to the one used for the iPhone photo application. My initial idea was a table view with each cell holding 4 images, can anyone point me in the right direction. I am particularly interesting in using APIs from Apple so not too bothered about 3rd party APIs / C...

How to customize UIWebView tap-hold-on-link sheet

Hi, I was wondering how I can override the UIActionSheet that appears when tapping and holding your finger on a link in an UIWebView (it shows the link and an open and copy button). I need to add a button to the alert, but I don't know how to customize it. Does anyone have an idea on how to solve this? ...

unique naming of objects as they are added to an NSMutableArray

how would i go about uniquely naming an object and adding it to an nsmutablearray most likely in a for loop? ...

troubles adding splash screen subviews to UIwindow

Hi, I have an app that has a login screen and splash screen. I want these screens to show up one after the other, and as such I have resulted to adding them as subviews to the app delegate's window property. [window addSubview:mainViewController.view]; [window addSubview:loginViewController.view]; [window addSubview:splashScreenViewCont...

App Rejected for not using HTTP Live Streaming Protocol

Do I need to make any code-level changes to play my videos over HTTP Live Streaming protocol? or is it more a server issue, where i need to re-encode the videos etc? We've reviewed your application, but cannot post this version to the App Store because it is not using the HTTP Live Streaming protocol, which is required for br...

Are modal view controllers the preferred way to replace the entire interface on an iPad?

Specifically, I have something like a game, with a menu screen made out of standard components. I want a button to switch to another view controller that the user will interact with for a while, then return to the menu screen. It seems like having the menu controller present the 'game' mode as a modal view controller is the most straight...

How do I resize a large image on an iPhone 3G without crashing my app?

I am working on an app that downloads images from a web site for display on iOS devices. The app runs fine on an iPad, but when run on an iPhone 3G (the only other physical device at my disposal for testing), it crashes when loading large images. As suggested elsewhere, it seems that 1024 x 1024 is about the largest size image it can con...

How to measure distance between two iphone devices using bluetooth?

Hi, Everyone, I'd like to do something in the following using bluetooth. Measure and display how far my iPhone is from another iPhone. Display direction of my iPhone. For example, I'd like to display something in the following on my iPhone application. My iPhone is connected to another iPhone:Harry's iPhone. In this case, Dist...

External library working in Debug profile but not in Release profile on iOS 3.1.*

Hi! I'm having a problem with my Three20-based application. It works perfectly fine on iOS 4, but on iOS 3.1.*, it only works with the Debug profile. When I try the Release profile, the application crashes with [NSObject doesNotRecognizeSelector:] at the first call to a Three20 method. If I comment out all Three20 method calls, the app ...

How to choose between a window , view or a navigation based application while developing for the iphone?

I am a complete newbie(as is already evident) and I can't just figure out when to choose what. I have been through countless googling operations but found no help on the said question, hence had to ask here. It would be great if any of you could explain or even point me to some online resource which does it. Thanks again for your time. ...

Building app for iPhone and iPad.

Can any one suggest how I can build Universal app for iPad as well iPhone. What all things I should take care of ? How to take care of resource images used ? Is it possible to have same code base should work for iPad as well iPhone. ...

What's the difference between the RootViewController, AppDelegate and the View Controller classes that I may create?

I am trying to learn programming for the iPhone and I keep seeing these files and I am not sure when is each file and content of those files referred to in the execution of a program built for the iPhone. I am trying to follow tutorials and tips available online but nowhere is there a point by point comparison or something like that. It ...

Getting UIView Type

I keep seeing examples that manually iterate through all of the subviews of a certain type in a UIView. For example, if you want a click outside of a keyboard to dismiss the keyboard regardless of which field is active, you might: -(IBAction)backgroundClick:(id)sender { [myTextField resignFirstResponder]; [myOtherTextField resi...

how to translate spatial information about uiimageviews from one xib to another xib

what would be the best way to retain information, i.e. positions of UIImageViews created in one to transfer to the other and simple int values for answers to math problems, across two xibs? in other words i have an app that autorotates to the device orientation and loads an xib for that orientation and what i want is anything done in one...

How to control Network Activity Indicator on iPhone

I know that in order to show/hide the throbber on the status bar I can use [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; But my program sends comm requests from many threads, and I need a location to control whether the throbber should b...

Add a shadow to a masked image

Hi there, I'm currently creating irregular images and I'd like to add a shadow to it programmatically : 1) load image (png file) 2) load mask (png file) 3) mask image with mask : output is an UIImage 4) add shadow to the irregular image (not squared nor circle) ...?? how do i do point 4 : should I 1) copy the current image 2) th...