Is there a way to know that a view controller is somewhere in the view controller lifecycle between -viewWillAppear and -viewWillDisappear?
I ask because I want to be damned sure that a method isn't fired when my view is either not on screen, or is about to disappear from the screen. When the view is about to disappear from the screen, ...
How can I determine if a UITabBarItem has the title "Hello" and is in position 0?
...
I am using cocos2d to develop a game. I used a TouchableSprite as follow:
http://www.cocos2d-iphone.org/forum/topic/3196
So, I create a new class which is a sub class of TouchableSprite. But it have some problems.... See the code first:
#import <Foundation/Foundation.h>
#import "TouchableSprite.h";
@interface MySprite : TouchableSpri...
if i have:
NSString* number = @"2000";
Will NSInteger integerNumber = [number integerValue];
be equal to the integer representation of 2000?
...
I have a fairly simple iPhone app that downloads a set of UITableView results into its model class, and a view controller that's set up to observe these changes using KVO.
This system works well (much better than scattering update code everywhere), except that when I get results, I add them to the backing NSMutableArray one-by-one. Thi...
When a UITextField object becomes first responder the keyboard magically appears. When it resigns first responder the keyboard magically slides away. What is causing this to happen? Is there something constantly watching in the background and makes the keyboard appear/disappear when it notices a text field becoming/losing first responder...
Simple iPad app.
App loads and displays a UITableView controlled by a subclass of UIViewController.
This works and rotates perfectly.
Clicking on a row in the table view causes a new subview to be created, also controlled by a UIViewController subclass.
This displays fine in portrait but does not adjust to landscape and does not respon...
The title pretty much sums it up, but what's happening is that I have a UIPopeverController popping up and presenting a UITableView from a toolbar button. Underneath the popover I have a large UIScrollView with several PDF pages being rendered into CATiledLayers using Quartz.
Whenever I try to scroll in the popover (the UITableView real...
In my 'Sectioned' UITableView I have two sections, the first one for Attributes like name and the second one is editable where you can add objects.
Here's a picture of it:
There's an attribute that the user can change (in this case Type) which would to change the number of rows in second section. To be more specific, if one property i...
Anyone has any idea how one can achieve the same look as when you press on the "From:" in the Mail iphone app when you have more than one user account.
I'd like to remove my keyboard, but WITHOUT animating it. Rather just disappear and instead of it have a UIPickerView appear.
Thanks much!
...
Can someone give me a quick, one-to-few paragraph(s) overview of the structure of iPhone apps. I'm working my way through a book, but I can't really understand the purpose of App Delegates, MainWindow.xib vs. individual views' nib files, actions vs. outlets, etc.
I'm looking for a high-level description, because all I can find are real...
Hi!
I've been doing some tests, and one of my needs is to read data from different xml files and stack it together on a single file. While I've managed to accomplish this, memory consumption seems to be quite large for the task, the iphone simulator didn't even raise the memory warning, but I don't think the real iPhone would tolerate th...
I could not really find this in the documentation ...
I'm writing some unit tests and one of the tests that is supposed to fail is [NSURL URLWithString: @"cow"]. Because cow is not a valid URL.
However, it is happily parsed by NSURL with no errors at all. It does not return nil and it does not throw an exception. Calling [url absoluteS...
I want to get the current image in an animation, How can I do it?
//Set up bottom view
UIImageView *bottomView = [[UIImageView alloc] initWithFrame:CGRectMake(30, 180, 50, 150)];
bottomView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"redLight.png"],
...
When I was reading about the new 4.0.2 iOS update I wanted to know what hackers do or try doing with a buffer overflow, which after some wikipedia'ing got me interested in playing with malloc and thus creating my own "NSObject".
I am not actually planning to use this in any of my applications, its only for learning and playing around wi...
I am writing an application that uses Synchronous NSURLConnection(s) and am finding that my application hangs if the url entered is incorrect. I tried to set a time out of .5 seconds but it does not seem to take. I read somewhere that it is not possible to set a time out on a Synchronous request (and yes it is very important to the appli...
How do I determine where the user touched in my view?
...
I have a UISegmentedControl on one of my pages. I want an editbox to appear when a segment is clicked right below the clicked segment. I would like it to be animated (slide in or something)
Is this possible? What would be the best way to do this?
Damn.I forgot to mention all this action is going to occur within a cell and not a simple ...
Hi all ... when I use :
NSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerText"];
NSLog(@"my text -> %@",myText);
I get all the JavaScript for the webView but what i want is to save the body text only from the web page so can any body help me with some codes or any ideas thanks
...
Hi,
I have 2 views. One is the 'viewheader' and the other is the 'viewContent' (added as subview).
'viewContent' contains a TableView (based on UINavigationController) and the TableView can drill down to a DetailView (UIViewController). (see Image below)
My Question is: How can I remove (pop) the DetailView, with a UIButton FROM the '...