Skip to content

Commit 4f53545

Browse files
fixed a bug calling init without assignment
1 parent 952bea6 commit 4f53545

File tree

7 files changed

+2
-35
lines changed

7 files changed

+2
-35
lines changed

ch14/iHotelApp/iHotelApp/JSONModel.m

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ -(id) initWithDictionary:(NSMutableDictionary*) jsonObject
1515
{
1616
if((self = [super init]))
1717
{
18-
self = [self init];
1918
[self setValuesForKeysWithDictionary:jsonObject];
2019
}
2120
return self;

ch14/iHotelApp/iHotelApp/Review.m

-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@
1111

1212
@implementation Review
1313

14-
- (id)init
15-
{
16-
self = [super init];
17-
if (self) {
18-
// Initialization code here.
19-
}
20-
21-
return self;
22-
}
23-
2414
//===========================================================
2515
// Keyed Archiving
2616
//

ch16/UIDeviceAdditions/UIDevice+MKAdditions.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ - (BOOL) canMakePhoneCalls
113113
- (BOOL) multitaskingCapable
114114
{
115115
BOOL backgroundSupported = NO;
116-
if ([self respondsToSelector:@selector(isMultitaskingSupported)])
117-
backgroundSupported = self.multitaskingCapable;
116+
if ([self respondsToSelector:@selector(multitaskingSupported)])
117+
backgroundSupported = self.multitaskingSupported;
118118

119119
return backgroundSupported;
120120
}

ch23/iHotelApp/iHotelApp/JSONModel.m

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ -(id) initWithDictionary:(NSMutableDictionary*) jsonObject
1212
{
1313
if((self = [super init]))
1414
{
15-
self = [self init];
1615
[self setValuesForKeysWithDictionary:jsonObject];
1716
}
1817
return self;

ch23/iHotelApp/iHotelApp/Review.m

-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@
1111

1212
@implementation Review
1313

14-
- (id)init
15-
{
16-
self = [super init];
17-
if (self) {
18-
// Initialization code here.
19-
}
20-
21-
return self;
22-
}
23-
2414
//===========================================================
2515
// Keyed Archiving
2616
//

ch24/iHotelApp/iHotelApp/JSONModel.m

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ -(id) initWithDictionary:(NSMutableDictionary*) jsonObject
1515
{
1616
if((self = [super init]))
1717
{
18-
self = [self init];
1918
[self setValuesForKeysWithDictionary:jsonObject];
2019
}
2120
return self;

ch24/iHotelApp/iHotelApp/Review.m

-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@
1111

1212
@implementation Review
1313

14-
- (id)init
15-
{
16-
self = [super init];
17-
if (self) {
18-
// Initialization code here.
19-
}
20-
21-
return self;
22-
}
23-
2414
//===========================================================
2515
// Keyed Archiving
2616
//

0 commit comments

Comments
 (0)