Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Xcode 4.2b6 ARC migration assistent

  • Loading branch information...
commit bb2def2e771446f513efbdfd8663e54a40a76398 1 parent 0d9127c
@jk authored
Showing with 4 additions and 10 deletions.
  1. +2 −2 JKAlertPrompt.h
  2. +0 −6 JKAlertPrompt.m
  3. +2 −2 NSDateAdditions.m
View
4 JKAlertPrompt.h
@@ -13,8 +13,8 @@
@interface JKAlertPrompt : UIAlertView {
UITextField *textField;
}
-@property (nonatomic, retain) UITextField *textField;
-@property (readonly) NSString *enteredText;
+@property (nonatomic, strong) UITextField *textField;
+@property (unsafe_unretained, readonly) NSString *enteredText;
-(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)delegate
cancelButtonTitle:(NSString *)cancelButtonTitle okButtonTitle:(NSString *)okButtonTitle placeholderText:(NSString *)placeholderText;
View
6 JKAlertPrompt.m
@@ -28,7 +28,6 @@ -(id)initWithTitle:(NSString *)title message:(NSString *)message delegate:(id)de
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
self.textField.keyboardType = UIKeyboardTypeEmailAddress;
self.textField.placeholder = placeholderText;
- [theTextField release];
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 130.0);
[self setTransform:translate];
}
@@ -44,11 +43,6 @@ -(NSString *)enteredText {
return textField.text;
}
-- (void) dealloc
-{
- [textField release];
- [super dealloc];
-}
@end
View
4 NSDateAdditions.m
@@ -19,7 +19,7 @@
@implementation NSDate (JKAdditions)
+ (NSDate*)dateWithToday {
- NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
+ NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-d-M";
NSString* time = [formatter stringFromDate:[NSDate date]];
@@ -28,7 +28,7 @@ + (NSDate*)dateWithToday {
}
- (NSDate*)dateAtMidnight {
- NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease];
+ NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
formatter.dateFormat = @"yyyy-d-M";
NSString* time = [formatter stringFromDate:self];
Please sign in to comment.
Something went wrong with that request. Please try again.