Вы находитесь на странице: 1из 210

Developer Tools Kickoff

Matthew Firlik
Director, Development Technologies

Xcode 4.0 March 2011

Schemes Archives

Apple LLVM Compiler


Automatic Provisioning

Code Completion

Single Window
Branching & Merging Tabs Unit Testing Live Issues

Interface Builder
Subversion Git

Version Editor
Behaviors Quick Help Build Settings View One-Click Filtering Code Snippets

Assistant Editor
C++ in LLVM Workspaces App Validation Static Analysis

LLDB
Jump Bar

Fix-It

Blame

Instruments

Archives

App Store Submission

Auto Layout for OS X Custom Behaviors Preprocess/Assembly Assistant

iOS Storyboards Automatic Reference Counting OpenGL ES Debugger

Developer ID Self-Contained Packaging Separate Tools Packages

Graphics Tools

Audio Tools

Hardware Tools

Accessibility Tools

Auxiliary Tools

Command Line Tools

Xcode 4.1
4GB

Xcode 4.2
1.5GB

Xcode 4.3.3
97MB

L@ a nguage

L@ a nguage

L@nguage

Objective-C

@ interface

@ class

@ property

@ property
@ synthesize

@ property

@ retain @ release

Automatic Reference Counting

@. . . . .

@ literals

@ strings

@ strings

@ @ @ strings @ @

@# @ {} @ @ [] @ ()

numbers dictionaries strings arrays expressions

Demonstration
Mike Ferris
Senior Engineering Manager, Xcode

@ literals

@ property
@ synthesize by default

Migration Support for Garbage Collection

L@nguage

Ed i t

Ed t

Code Completion with Quick Help

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

#import "SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" #import "SGTLandmarkDetailViewController.h" "SGTLandmarkTableViewCell.h" #import "SGTLandmarksViewController.h" #import "SGTLandmarkTableViewCell.h" "SGTLandmarkRepository.h" "SGTLandmark.h" #import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { SGTLandmarkDetailViewController *detailViewController = [segue destin [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark setText[landmark localizedName]]; localizedName]]; return cell; }

Code Completion with Quick Help

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

#import "SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" #import "SGTLandmarkDetailViewController.h" "SGTLandmarkTableViewCell.h" #import "SGTLandmarksViewController.h" #import "SGTLandmarkTableViewCell.h" "SGTLandmarkRepository.h" "SGTLandmark.h" #import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { SGTLandmarkDetailViewController *detailViewController = [segue destin [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan C [detailViewController NSIndexPath setLandmark:selectedLandmark]; } C NSIndexSet

The NSIndexPath class represents the path to a specic node in a of nested array collections. This*)tableView path is knownwillDisplayCell:(UITableViewCe as an index - tree (void)tableView:(UITableView path. More [cell setBackgroundColor:[UIColor clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark setText[landmark localizedName]]; localizedName]]; return cell; }

Code Completion with Quick Help

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

#import "SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" #import "SGTLandmarkDetailViewController.h" "SGTLandmarkTableViewCell.h" #import "SGTLandmarksViewController.h" #import "SGTLandmarkTableViewCell.h" "SGTLandmarkRepository.h" "SGTLandmark.h" #import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { SGTLandmarkDetailViewController *detailViewController = [segue destin [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan C [detailViewController NSIndexPath setLandmark:selectedLandmark]; } C NSIndexSet

The NSIndexSet class represents an immutable of unique NSIndexPath class represents the path to a collection specic node in a integers, as indexes because of the way are tree of nested arrayknown collections. This*)tableView path is known as anthey index - unsigned (void)tableView:(UITableView willDisplayCell:(UITableViewCe used. This setBackgroundColor:[UIColor collection is referred to as an index set. More path. More [cell clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark setText[landmark localizedName]]; localizedName]]; return cell; }

#import #import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmarkRepository.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan C [detailViewController NSIndexPath setLandmark:selectedLandmark]; } C NSIndexSet

The class represents anthe immutable collection of unique TheNSIndexSet NSIndexPath class represents path to a specic node in a integers, known as indexes because the way they are tree of nested array collections. This path is of known as an index - unsigned (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe used. This setBackgroundColor:[UIColor collection is referred as an index set. More path.to More [cell clearColor]]; }

Code Completion with Quick Help

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

#import #import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmarkRepository.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

Code Completion with Quick Help

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

#import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Improved Quick Help

#import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Improved Quick Help

#import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { prepareForSegue [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Improved Quick Help

#import "SGTLandmarkRepository.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel Declaration - (void) prepareForSegue:(UIStoryboardSegue *)segue ! sender:(id)sender = [[[SGTLandmarkRepository sharedInstan SGTLandmark *selectedLandmark [detailViewController setLandmark:selectedLandmark]; } Abstract Noties the view controller that a segue is about to be performed.
Parameters segue The segue object containing information about the view controllers involved in the segue.

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe The object that initiated the segue. You might use this sender parameter to perform different actions based on which [cell setBackgroundColor:[UIColor clearColor]]; control (or other object) initiated the segue. }
Availability iOS (5.0 and later)

Declared UIViewController.h - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return Reference [[[SGTLandmarkRepository UIViewController Reference sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Improved Quick Help

#import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Trailing Whitespace Removal

#import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Trailing Whitespace Removal

#import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell; }

Trailing Whitespace Removal

#import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; return cell;

Trailing Whitespace Removal

#import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; } }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; } }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText:[landmark localizedName]]; [[cell cell; nameLabel] setText:[landmark localizedName]]; return return cell; }

Trailing Whitespace Removal

Sightseer
Replace Replace All Replace

View Controllers
Replace & Find

SGTViewCon

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Sightseer
Replace Replace All Replace

View Controllers
Replace & Find

SGTViewCon
selected

current

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Sightseer
Replace Replace All Replace

View Controllers
Replace & Find

SGTViewCon
selected

current

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Sightseer
Replace Replace All Replace

View Controllers
Replace & Find

SGTViewCon
selected

current

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Sightseer
Replace Replace All Replace

View Controllers
Replace & Find

SGTViewCon
selected

current

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Sightseer
Replace In Selection Replace All Replace

View Controllers
Replace & Find

SGTViewCon
selected

current

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstan [detailViewController setLandmark:selectedLandmark]; }

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

Replace in Selection

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

Symbolic Searches

Search Performance

grep

Xcode

19.3 seconds

grep

Xcode

19.3 seconds

4.6 seconds
grep Xcode

Callers (2)

SGTViewController.m

#import "SGTLandmarksViewController.h" #import "SGTLandmark.h" @implementation SGTLandmarksViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue des NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathFor SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedIns [detailViewController setLandmark:selectedLandmark]; }

Caller and Callee Assistant Editor

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableVie [cell setBackgroundColor:[UIColor clearColor]]; [cell setNeedsLayout]; }

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

Selective Commit

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

Selective Commit

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

Selective Commit

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

1
Dont Commit Discard Change

Selective Commit

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

SGTLandmarkDetailViewController *detailViewController = [segue destinationViewContr NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSelectedRow]; SGTLandmark *selectedLandmark = [[[SGTLandmarkRepository sharedInstance] landmarks

1
Dont Commit Discard Change

Selective Commit

Source Control Branching

Committing project changes with Xcode 4.4: Modernized to new Objective-C syntax Removed @synthesize calls Removed forward declarations in implementations

Source Control Branching

Committing project changes with Xcode 4.4: Modernized to new Objective-C syntax Removed @synthesize calls Removed forward declarations in implementations

Source Control Branching

Committing project changes with Xcode 4.4: Modernized to new Objective-C syntax Removed @synthesize calls Removed forward declarations in implementations

Source Control Branching

Committing awesome project changes with Xcode 4.4: Modernized to new Objective-C syntax Removed @synthesize calls Removed forward declarations in implementations Updated implementation to not use recursive lock

Source Control Branching

Ed t

Design

Des gn

ntegrated

Localvze

Localvze

rench

French German Spanish

English

rench

French

German

English Spanish

rench

French

German

English Spanish

rench

French

English

German

Spanish

rench

French

English

German

Base User Interface

Spanish

rench

French

English

German

Base User Interface Localized Application

Spanish

rench

Spanish English German French

Base User Interface Localized Application

Demonstration
Jon Hess
Senior Engineering Manager, Xcode

rench

Spanish English German French

Base User Interface Localized Application

rench

French

English

German

Base User Interface Localized Application

Spanish

Des gn

Issues Improvements Optim]ze i

Issues Improvements Optim]ze

#import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin

NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmar *selectedLandmark = [[[SGTLandmarkRepository sharedInstanc ^ [detailViewController setLandmark:selectedLandmark];

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText[landmark localizedName]];

#import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin

NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmar *selectedLandmark = [[[SGTLandmarkRepository sharedInstanc ^ [detailViewController setLandmark:selectedLandmark];

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText[landmark localizedName]];

#import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; }

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [super prepareForSegue:segue sender:sender]; SGTLandmarkDetailViewController *detailViewController = [segue destin

NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmar *selectedLandmark = [[[SGTLandmarkRepository sharedInstanc ^ [detailViewController setLandmark:selectedLandmark];

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText[landmark localizedName]];

#import #import #import #import

"SGTLandmarkDetailViewController.h" "SGTLandmarksViewController.h" "SGTLandmarkTableViewCell.h" "SGTLandmark.h"

@implementation SGTLandmarksViewController

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NS return [[[SGTLandmarkRepository sharedInstance] landmarks] count]; } Issue Fix-it

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { Unknown type name SGTLandmar: did you mean SGTLandmark? [super prepareForSegue:segue sender:sender]; Replace SGTLandmar with SGTLandmark SGTLandmarkDetailViewController *detailViewController = [segue destin

NSIndexPath *selectedLandmarkPath = [[self tableView] indexPathForSel SGTLandmar *selectedLandmark SGTLandmark *selectedLandmark==[[[SGTLandmarkRepository [[[SGTLandmarkRepositorysharedInstanc sharedInstan [detailViewController setLandmark:selectedLandmark];

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCe [cell setBackgroundColor:[UIColor clearColor]]; }

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndex SGTLandmarkTableViewCell *cell = [tableView dequeueReusableCellWithId SGTLandmark *landmark = [[[SGTLandmarkRepository sharedInstance] land [[cell nameLabel] setText[landmark localizedName]];

LLVM
Chris Lattner
Director, Development Technologies

LLVM Inside

LLVM Inside

Apple LLVM Compiler 4

Apple LLVM Compiler 4

-Weverything

C++

New Loop Optimizations


Ivy Bridge Mac Support

New ARC Optimizations


Faster ARM Compiles

AVX Vectors

New Warnings Objective-C Literals


Integrated ARM Assembler Improved Register Allocation

GC to ARC Migrator

C++

Xcode 4
Full C++98 Support

Xcode 4.2

Full C++98 Support

Xcode 4.2
'auto' variables Range-based for loops Rvalue references & move semantics Variadic templates Extended SFINAE Alias templates Declared type of an expression (decltype) Default template arguments for function templates Deleted functions Extern templates Inline namespaces Static assertions Strongly typed enums Other: nullptr, override, final, noexcept,

Xcode 4.3

Inline namespaces Static assertions Strongly-typed enums Other: nullptr, override, final, noexcept, ...

Xcode 4.3
Defaulted special member functions Delegating constructors Explicit conversion operations Implicitly move constructors & assignment operators Non-static data member initializers Raw string literals Unicode string literals Alignment support - alignas

Xcode 4.4
Atomics Generalized constants - constexpr Generalized initializer lists

'Defaulted special member functions Delegating constructors Explicit conversion operations Implicitly move constructors & assignment operators Non-static data member initializers Raw string literals Unicode string literals Alignment support - alignas

Xcode 4.4
Atomics Generalized constants - constexpr Generalized initializer lists

'Defaulted special member functions Delegating constructors Explicit conversion operations Implicitly move constructors & assignment operators Non-static data member initializers Raw string literals Unicode string literals Alignment support - alignas

Xcode 4.4
Atomics Generalized constants - constexpr Generalized initializer lists

Lambdas

Compiler Warnings

-Wall

-Wall -Wextra -pedantic -Wformat=2

-Weverything

-Weverything -Wno-extra-tokens -Wno-unused-parameter -Wno-format-y2k

-Weverything -Wno-extra-tokens -Wno-unused-parameter -Wno-format-y2k

Static Analyzer

Cross Function Analysis

Cross Function Analysis

Cross Function Analysis

New Analyzer Checks


GCD Security 32/64-bit Unix APIs malloc/free Core Foundation

Select Individual Checkers

For more information on any particular command, try help <command-name>. (lldb)

LLVM-GCC

GDB

LLVM-GCC

GDB

Demonstration
Ted Kremenek
Senior Engineering Manager, LLVM Compiler

For more information on any particular command, try help <command-name>. (lldb)

Optim]ze

Deploy

Depl y

App Store

Developer ID

App Store

Developer ID

App Store

Teams

Devices

Profiles

Certificates

Game Center

iCloud

Push Notifications

In App Purchase

Passbook

Transit App

Entitlements

Enable App Sandbox


Network Allow Incoming Network Connections Allow Outgoing Network Connections Hardware

Allow Camera Access


Allow Microphone Access Allow USB Access Allow Printing

Apps

Allow Address Book Data Access Allow Location Services Access


Allow Calendar Data Access

Xcode

File

Edit

View

Navigate

Editor

Product

Window

Xcode

File

Edit

View

Navigate

Editor

Product Run Test Prole Analyze Archive

Window

R U I B

Build For Perform Action Build Clean Stop Generate Output Debug Debug Workow Attach to Process Edit Scheme New Scheme Manage Schemes

B K .

<

Xcode

File

Edit

View

Navigate

Editor

Product Run Test Prole Analyze Archive

Window

R U I B

Build For Perform Action Build Clean Stop Generate Output Debug Debug Workow Attach to Process Edit Scheme New Scheme Manage Schemes

B K .

<

Sightseer
Archive Type: iOS App Archive Creation Date: June 12, 2012 9:45AM Version: 1.4 Identier: com.apple.sightseer Estimated App Store Size: 15MB

Validate Distribute

Name Name SightSeer Sightseer Sightseer Creation Date June 8, 2012 2:07PM June 10, 2012 6:22PM June 11, 2012 9:45AM Comment Status Submitted Validated

Sightseer
Archive Type: iOS App Archive Creation Date: June 12, 2012 9:45AM Version: 1.4 Identier: com.apple.sightseer Estimated App Store Size: 15MB

Validate Distribute

Name Name SightSeer Sightseer Sightseer Creation Date June 8, 2012 2:07PM June 10, 2012 6:22PM June 11, 2012 9:45AM Comment Status Submitted Validated

Select the method of distribution:

Submit to the iOS App Store Sign, package, and submit application to the iOS App Store.

Save for Enterprise or Ad-Hoc Deployment Sign and package application for distribution outside of the iOS App Store.

Export as Xcode Archive Export the entire Xcode archive of this application

Cancel

Previous

Next

Select the method of distribution:

Submit to the Mac App Store Sign, package, and submit application to the Mac App Store.

Export Developer ID-signed Application Save a copy of the application signed with your Developer ID.

Export as

Xcode Archive

Cancel

Previous

Next

Beta Testing

Mac App Store

Now
iOS App Store

Developer ID

Ad-Hoc Deployment

Enterprise Deployment

Beta Testing

Mac App Store

Now
iOS App Store

Developer ID

Ad-Hoc Deployment

Enterprise Deployment

Now

Available Now

Available Now

Вам также может понравиться