Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
XCode Noob
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MacGuy18" data-source="post: 627323" data-attributes="member: 13772"><p>Anybody,</p><p></p><p>I am very new to xcode and coding in general, but with the newest SDK available for the iPhone I have found myself (like many others) interested in getting started. I downloaded the application called "SimpleDrillDown" from Apple's Developers Site. Below is an example of the code as I have revised it. The only thing I have been able to do is change the titles of buttons and windows.</p><p>================================</p><p></p><p>#import "SimpleDrillDownAppDelegate.h"</p><p>#import "MasterViewController.h"</p><p></p><p></p><p>@implementation SimpleDrillDownAppDelegate</p><p></p><p>@synthesize window;</p><p>@synthesize masterList;</p><p></p><p> </p><p>- (void)applicationDidFinishLaunching<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" />UIApplication *)application { </p><p> // Set up the window and content view</p><p> window = [[UIWindow alloc] initWithFrame<img src="/mac_images/images/smilies/Embarrassed.png" class="smilie" loading="lazy" alt=":[" title="Embarrassed :[" data-shortname=":[" />[UIScreen mainScreen] bounds]];</p><p> </p><p> // Set up the table view controller</p><p> MasterViewController *masterController = [[MasterViewController alloc] init];</p><p> masterController.appController = self;</p><p> </p><p> // Create a navigation controller using the new controller</p><p> navigationController = [[UINavigationController alloc] initWithRootViewController:masterController];</p><p> [masterController release];</p><p> </p><p> // Add the navigation controller's view to the window</p><p> [window addSubview<img src="/mac_images/images/smilies/Embarrassed.png" class="smilie" loading="lazy" alt=":[" title="Embarrassed :[" data-shortname=":[" />navigationController view]];</p><p> [window makeKeyAndVisible];</p><p> </p><p> </p><p> // Create an array containing some test data</p><p> masterList = [[NSMutableArray alloc] init];</p><p> NSMutableDictionary *dictionary;</p><p> NSMutableDictionary *characters;</p><p> </p><p> characters = [[NSArray alloc] initWithObjects<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite4" alt=":mad:" title="Mad :mad:" loading="lazy" data-shortname=":mad:" />"A/F Ratio", @"Spark Timing", @"Intake Air Temperature", @"Engine Speed", @"Load", @"Boost Pressure", nil];</p><p> dictionary = [[NSMutableDictionary alloc] initWithObjectsAndKeys<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite4" alt=":mad:" title="Mad :mad:" loading="lazy" data-shortname=":mad:" />"Data Logging", @"title", characters, @"mainCharacters", nil];</p><p> [masterList addObject:dictionary];</p><p> [dictionary release];</p><p> [characters release];</p><p> </p><p> </p><p> </p><p>}</p><p></p><p></p><p>- (void)dealloc {</p><p> </p><p> [navigationController release]; </p><p> [masterList release]; </p><p> [window release]; </p><p> [super dealloc];</p><p>}</p><p></p><p></p><p>@end</p><p></p><p>================================</p><p>My questions are...</p><p></p><p>1) After I touch "Data Logger" I want to be able to touch, for example, "Engine Speed" and a new window come across. How do I do this?</p><p></p><p>2) In this new window I want to be able to put a slider and a button, how do I do this?</p><p></p><p>3) Also, in this new window i want to be able to have an alert come up. how do I do this?</p><p></p><p>I have read a lot of the information, but it's not helping much. I was hoping I could get some good help here.</p><p></p><p>Thanks,</p><p></p><p>--</p><p>MacGuy18</p><p></p><p>P.S. This is an example from apple that I have played with in order to gain an understanding of how things work. I will not be using it for my personal gain. I hope this doesn't violate forum rules. If so, please delete.</p></blockquote><p></p>
[QUOTE="MacGuy18, post: 627323, member: 13772"] Anybody, I am very new to xcode and coding in general, but with the newest SDK available for the iPhone I have found myself (like many others) interested in getting started. I downloaded the application called "SimpleDrillDown" from Apple's Developers Site. Below is an example of the code as I have revised it. The only thing I have been able to do is change the titles of buttons and windows. ================================ #import "SimpleDrillDownAppDelegate.h" #import "MasterViewController.h" @implementation SimpleDrillDownAppDelegate @synthesize window; @synthesize masterList; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Set up the window and content view window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Set up the table view controller MasterViewController *masterController = [[MasterViewController alloc] init]; masterController.appController = self; // Create a navigation controller using the new controller navigationController = [[UINavigationController alloc] initWithRootViewController:masterController]; [masterController release]; // Add the navigation controller's view to the window [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; // Create an array containing some test data masterList = [[NSMutableArray alloc] init]; NSMutableDictionary *dictionary; NSMutableDictionary *characters; characters = [[NSArray alloc] initWithObjects:@"A/F Ratio", @"Spark Timing", @"Intake Air Temperature", @"Engine Speed", @"Load", @"Boost Pressure", nil]; dictionary = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Data Logging", @"title", characters, @"mainCharacters", nil]; [masterList addObject:dictionary]; [dictionary release]; [characters release]; } - (void)dealloc { [navigationController release]; [masterList release]; [window release]; [super dealloc]; } @end ================================ My questions are... 1) After I touch "Data Logger" I want to be able to touch, for example, "Engine Speed" and a new window come across. How do I do this? 2) In this new window I want to be able to put a slider and a button, how do I do this? 3) Also, in this new window i want to be able to have an alert come up. how do I do this? I have read a lot of the information, but it's not helping much. I was hoping I could get some good help here. Thanks, -- MacGuy18 P.S. This is an example from apple that I have played with in order to gain an understanding of how things work. I will not be using it for my personal gain. I hope this doesn't violate forum rules. If so, please delete. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
XCode Noob
Top