When I call setNeedsDisplayInRect on a UIView, and the drawRect method fires...am I responsible for making sure I'm not rendering stuff that's outside the CGRect I called, or will the framework handle that for me? Example:
-(void)drawRect:(CGRect)rect
{
//assume this is called through someMethod below
CGContextRef ctx = UIGraphicsGe...
I'm looking two do two things:
Check if a week has gone by (based on the day of the week)
Check if a day has gone by (based on the date)
I'm not sure what the best way to solve this is, since when comparing two NSDates (one at 1/1/09 at 21:30 and another at 1/2/09 at 00:30) I can't just see if 24 hours has gone by since in this case ...
I've added a several .png files as resources to my project. How can I get an array of their names without having to hardcode them?
...
There is a 'Done' button on the input pad on iphone, but there is no action to it by default. Can I add an action to it? For example, hide the input pad when 'Done' is pressed?
...
There is no 'Done' button on number pad by default. When a user finishes entering his numeric information in a textfield, how can I make the number pad disappear?
I may do this by remaining the Text Input Traits default, but users have to switch to number pad every time they input their numbers. Are there any other ways to show a 'Done'...
How do you programatically do the following from the iPhone SDK
1) Programatically Dial a Phone Number through the iPhone SDK
2) Bypass the dial / cancel prompt that the iPhone brings up
3) Send additional DTMF after the number is dialed just like how you would program pauses into a regular phone.
I know you can make a tel:// call ...
How can you dynamically add values to UIPickerView at runtime.
I'm using the following code to populate a UIPickerView statically. Need to add
values dynamically at run time, for e.g. Three, Four etc.
- (NSString *) pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component{
NSString *title ...
I add 3 views for an application and they need to switch from 1-2-3.
Now I add a toolBar and a button 'OK' on the bottom of SwitchViewController, so they can share the button to go to next view.
But how to add a 'Back' button so that I can switch from 2-1 or 3-2 and the button shouldn't be seen in the first view?
Are there any other w...
I want to switch 3 views and let them switch from 1-2-3. The first view is to let users input name and password, the second view will show his information to let him confirm and the third view will show him a list of options so he can choose what to do next.
The problem is how to switch these views? If I use a navigation controll to swi...
Anyone have any suggestions for good iPhone development related podcasts?
Only one I've run across is http://www.mobileorchard.com/ and was looking for some others.
...
I want to limit the length of a textfield, so that a user can know how many characters he can input. But I find no such attributes of textfield on iPhone. Any ideas how to do this?
And how to switch from one textfield to another when it reaches its max length? (to let users type easily)
...
I'm developing Piano App for iPhone.
I'd like to develop smooth-scrollable keyboard (like Music Sampler).
I put a custom view(1440px x 120px) in UIScrollView.
I wanted to use OpenGL because Quartz is too slow.
But I couldn't make OpenGL view in 1440px.
Any idea to make a faster & large-sized custom view?
Thank you.
...
I have a UIViewController which has a retainCount of 3 the moment I instantiate it. That stirs me as terribly incorrect. What's the best way of figuring out who bumped up the retainCount to 3? I'd imagine instantiating the object should give the pointer 1, then I suppose maybe pushing it onto the UINavigationController's stack might bump...
Hi all,
I was curious, when one goes ahead and executes their code for leaks checking with Instruments -- is it prudent to hit all of the parts of the app manually to ensure memory leaks are occurring in that respective area? For instance, I believe I have some memory leaks in my application, deep within a UINavigationController tree. D...
Here's a hypothetical getter:
- (DetailViewController *)detailController
{
if (detailController == nil) {
DetailViewController *controller = [[DetailViewController alloc] initWithNibName:@"Detail" bundle:nil];
self.detailController = controller;
[controller release];
}
return detailController;
}
Then the ...
How can I use the UIWebView in Xcode so that when it loads up pages it DOESN'T download the images (to cause a faster loading page)?
...
I have a class which is responsible and the owner of building my model objects. It allocates memory for the models and has them retained and is responsible for releasing them when dealloc happens.
Now I have a respective UIViewController which is acting as the client in this case. It will have several instance variables, pointing to the...
I'm looking over Apple's sample application EditableDetailView, and noticed that in one of their controllers, they're setting an instance of NSString property with (nonatomic, copy). When would one use copy instead of retain? Is this so they can make a unique copy without affecting the existing data?
...
I am displaying a model view with
[self presentModalViewController:controller animated:YES];
When the view moves up the screen it is transparent as per the setting in the xib file it is created from, but once it fills the screen it goes opaque.
Is there anyway of keeping the view transparent?
I suspect that the view it is being pl...
I'm having a difficult time understanding where actual Leaks are happening and where they are not in my application using Instruments. I have objects which are autoreleased and not being retained afterwards.. that are showing up as leaks via Instruments. There's also a bunch of objects which are listed as leaking that don't point back to...