How do I refer to the preceding view controller's properties and iboutlets in a uinavigationcontroller stack of views?
For instance, say the first screen has a high score uilabel, and the second screen is the game. How would I update this label from the game screen before popping back to it?
EDIT
Thanks for the answers. I think I wi...
I'm not an iPhone developer but I'm starting on a project that is based on a PHP back-end server supplying data to iPhone useragents and I'm wondering where to start with sessions/security.
With browsers, I can simply pass a cookie (containing a session id) on login.
However, I'm wondering if the iPhone is different. Do iPhone apps hav...
Hello
If i develop an app through which we can choose a date and time and enter a text and that text should be added for the corresponding date and time of the native i phone calendar.Is there any way to achieve that.Please help me out.Thanks.
...
I'm at a loss! It's one of those pesky bugs that happens only under specific conditions, yet I cannot link the conditions and the results directly.
My app has a paged UIScrollView where each page's view comes from a MyViewController, a subclass of UITableViewController. To minimize memory usage I unload those controllers that are not c...
I have a ViewController consisting of just a textView. In its viewDidLoad method, I simply initialize the textView and add it as a subview. In my main ViewController class, when the user presses a button, I switch views and display the view that has the textView. I am trying to change the textView's text however it is not working. Can I ...
I want to test add local notification. I want it repeat daily/hourly. How can I do that?
NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar];
// Get the current date
NSDate *now = [NSDate date];
// Break the date up into components
NSDateComponents *dateComponents = [calendar components:( NSYearCalendarUnit | NSMo...
Hello everyone. I am having trouble with OpenGL 1.1 lighting. My code works on the iPhone 4 but not the iPhone 3G. Everything appears unlit (flat colours). I don't have a 3GS so I can't find out if it works on that one or not.
Here is my lighting setup:
- (void)setupLighting
{
const GLfloat lightAmbient[] = {0.2, 0.2, ...
A good example of the behavior I'm trying to illustrate is when you click on the "Edit" button in the iOS Clock app, the on/off switch transforms into a chevron.
I have a UITableView that contains a cell with a switch control on it. When the user click the "Edit" button in the nav bar, I'd like the switch to go away and get replaced ...
Hi i've been struggling with these errors for a day now.
I'm using the TouchJSON framework(http://code.google.com/p/touchcode/) for the iphone.Everything compiles fine on the iphone simulator but when i try to compile on the device i get link errors.
Undefined symbols:
"___switch8", referenced from:
-[NetworkController constructByte...
I'm using the new block-oriented UIView animation methods to create a sliding-and-fading slideshow inspired by the one that shows up on the home screen of the Flickr application. It's all working very nicely, and I'm no longer intimidated by blocks.
Where I'm using this is on a page of my app that's inside UINavigationController control...
I want to know when the status bar changes height as a result e.g. of a phone call in progress. So I put the following in my UIApplicationDelegate:
-(void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame {
NSLog(@"yup, got here");
}
and indeed when I toggle the in-call status bar on the ...
I've set up a UISwipeGestureRecognizer:
UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:delegate action:@selector(handleSwipeGesture:)];
swipe.direction = UISwipeGestureRecognizerDirectionUp;
[self addGestureRecognizer:swipe];
[swipe release];
A swipe makes the player move in the direction of the swi...
I have a main page set as a UITableView. I have it set so that you can click on a row, then go to a detail page where there is a UIButton (a save button) which I would like to make the app return to the original page. I know that it automatically sets a left bar button item as a return button, but I need to use a UIButton on the main p...
Hey everyone,
I'm relatively new to iPhone programming but have read my way through a hefty book already.
I want to build a Tabbed Application where in one of the tabs I can push a button that presents a modal view over the screen.
I have built demo apps that utilize UITabBarController and the ModalView system, but I can't figure out ...
Hi I am a newbie to objective C and was wondering how I could form an NSDictionary with the following structure.
level 1
level attribute 1.1 - level score - level percent
level attribute 1.2 - level score - level percent
level attribute 1.3 - level score - level percent
level 2
level attribute 2.1 - level score - level ...
Hi There,
Basically, here is my view hierarchy (and I appologize if this is hard to read... I'm new here so posting suggestions happily accepted)
--AppControls.xib
-------(UIView)ControlsView
----------------- (UIView)TopBar
----------------- -------------- btn1, btn2, btn3
----------------- UIView)BottomBar
----------------- -...
I'm looking for a smart way to remove a subview (with removeFromSuperview) when the subview itself (or precisely said one of its components) triggered the removal. As for the source code this would be like
UIView * sub_view = [[[UIView alloc] initWith...
UIButton *button = [UIButton buttonWithType...
[sub_view addSubview:button];
[se...
I am trying to be an ABRecordRef that represents the contact info of a person from addressbook. I built two functions that calls a function to fill in a personal data structure with the info in ABRecordRef.
Here comes the function declarations for the three functions:
+ (NSMutableArray*) getAllContactProfiles{
NSMutableArray *list...
This is a bit complex.
I've created an array (NSArray) called pointsOfInterest.
The elements of this array are NSDictionary objects. Each dictionary has two keys, "headerTitle" and "rowObjects." The value for "headerTitle" is a simple NSString; the object for "rowObjects" is another NSArray of objects; each of these is a custom class.
...
Using the TARGET_IPHONE_SIMUATOR macro results in the same constant values being defined in am application. For example:
#ifdef TARGET_IPHONE_SIMULATOR
NSString * const Mode = @"Simulator";
#else
NSString * const Mode = @"Device";
#endif
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
...
NSLog(@"Mode: %@", M...