iOS Einführung am   Beispiel von play NEXT TEE    Hendrik Ebel (27.08.2012)
Themen•play NEXT TEE Demo•Objective C 2.0 Überblick•play NEXT TEE intern•XCode Best Practice
play NEXT TEE Demo                Golfplatzeingabe  simple Golf   Runden spielenScoring App     und Schläge fürs iPhone   ...
play NEXT TEE Demo
play NEXT TEE Demo
Objective C 2.0• Objective C 2.0 - since Oct 2007 with OS X 10.5  • modern Garbage Collector  • 64 bit  • properties synta...
*.h - Class Structure
*.h - Class Structure#import <UIKit/UIKit.h>#import "NTEditTournamentViewController.h"@class NTCourse;@interface NTStartRo...
*.m - Class Structure#import "NTEditTournamentViewController.h"@interface NTStartRoundTableViewController ()@end@implement...
Typs and more• id - dynamic typing• BOOL (YES, NO) - bool (true, false)• NSString, NSNumber, NSDate• NSArray, NSSet, NSDic...
Send a message
Message examples- (UIView *)pickerView:(UIPickerView *)pickerView     viewForRow:(NSInteger)row     forComponent:(NSIntege...
Properties// Copy the object during assignment.@property (copy) MyModelObject *theObject;// Declare only a getter method.@...
Dot-Notation vs. [...]int x = foo.value;int x = [foo value];someView.frame.size.width = 30; // This is valid code!myObject...
play NEXT TEE intern• Config           • Bsp. UseCases• StoryBoards      • TableView• CoreData         • Input (Picker, ......
XCode Best Practice• Code Completion (kein auto #import)• Refactoring (auch für StoryBoard)• StoryBoards (Komplex, XIB Fil...
DANKE!
Upcoming SlideShare
Loading in …5
×

iOS Einführung am Beispiel von play NEXT TEE

1,221 views
1,137 views

Published on

iOS Einführung am Beispiel von play NEXT TEE einer einfachen Golf-Scoring App fürs iPhone.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,221
On SlideShare
0
From Embeds
0
Number of Embeds
286
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • iOS Einführung am Beispiel von play NEXT TEE

    1. 1. iOS Einführung am Beispiel von play NEXT TEE Hendrik Ebel (27.08.2012)
    2. 2. Themen•play NEXT TEE Demo•Objective C 2.0 Überblick•play NEXT TEE intern•XCode Best Practice
    3. 3. play NEXT TEE Demo Golfplatzeingabe simple Golf Runden spielenScoring App und Schläge fürs iPhone dokumentieren Handicap Berechnung
    4. 4. play NEXT TEE Demo
    5. 5. play NEXT TEE Demo
    6. 6. Objective C 2.0• Objective C 2.0 - since Oct 2007 with OS X 10.5 • modern Garbage Collector • 64 bit • properties syntax - @synthesize, ... • Dot-Notation • Fast Enumeration - „for-in“
    7. 7. *.h - Class Structure
    8. 8. *.h - Class Structure#import <UIKit/UIKit.h>#import "NTEditTournamentViewController.h"@class NTCourse;@interface NTStartRoundTableViewController : UITableViewController <NTEditTournamentViewControllerDelegate>@property (strong, nonatomic) IBOutlet UITableViewCell *courseCell;@property (strong, nonatomic) IBOutlet UIBarButtonItem *startButton;@property (strong, nonatomic) IBOutlet UIBarButtonItem *backButton;@property (strong, nonatomic) NSMutableArray *selectedTeammates;@property (strong, nonatomic) NTCourse *selectedCourse;@property (strong, nonatomic) NSString *selectedTournamentName;- (IBAction)backAction:(id)sender;- (IBAction)startAction:(id)sender;@end
    9. 9. *.m - Class Structure#import "NTEditTournamentViewController.h"@interface NTStartRoundTableViewController ()@end@implementation NTStartRoundTableViewController@synthesize courseCell;@synthesize tournamentCell;- (void)viewDidLoad{ [super viewDidLoad]; // ..}- (void)viewDidUnload{ // .. [super viewDidUnload];}@end
    10. 10. Typs and more• id - dynamic typing• BOOL (YES, NO) - bool (true, false)• NSString, NSNumber, NSDate• NSArray, NSSet, NSDictionary• „nil“ - is a null pointer to an Objective-C object.• „Nil“ - is a null pointer to an Objective-C class.• „NULL“ - is a null pointer to anything else.
    11. 11. Send a message
    12. 12. Message examples- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view;- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex;
    13. 13. Properties// Copy the object during assignment.@property (copy) MyModelObject *theObject;// Declare only a getter method.@property (readonly) NSView *rootView;// Declare delegate as a weak reference@property (weak) id delegate;// Assign new value, change name of getter method@property (assign, getter=isEnabled) BOOL enabled;strong = Specifies that there is a strong (owning) relationship to the destinationobject. weak = Specifies that there is a weak (non-owning) relationship to the destinationobject. If the destination object is deallocated, the property value is automaticallyset to nil. (Weak properties are not supported on OS X v10.6 and iOS 4; use assigninstead.)
    14. 14. Dot-Notation vs. [...]int x = foo.value;int x = [foo value];someView.frame.size.width = 30; // This is valid code!myObject.property = YES;[myObject setProperty:YES];
    15. 15. play NEXT TEE intern• Config • Bsp. UseCases• StoryBoards • TableView• CoreData • Input (Picker, ...)• UI Controller • WebView• Delegates • Navigation Seque Handling• i18N
    16. 16. XCode Best Practice• Code Completion (kein auto #import)• Refactoring (auch für StoryBoard)• StoryBoards (Komplex, XIB Files, i18n)• Build and Run (einfach und schnell)• Developer Account (Hardware Tests nur für 79 EUR pro Jahr)
    17. 17. DANKE!

    ×