Skip to content

Commit

Permalink
Update project settings to those recommended by XCode5
Browse files Browse the repository at this point in the history
  • Loading branch information
scalessec committed Nov 17, 2013
1 parent c832849 commit d3a241e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
10 changes: 7 additions & 3 deletions Toast.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@
151FC0C913D34B79007DC282 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0450;
LastUpgradeCheck = 0500;
TargetAttributes = {
151FC0D113D34B7A007DC282 = {
DevelopmentTeam = 3NC359BQ4D;
};
};
};
buildConfigurationList = 151FC0CC13D34B79007DC282 /* Build configuration list for PBXProject "Toast" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -231,7 +236,6 @@
151FC0F113D34B7A007DC282 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJCPP_ARC_ABI = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -244,6 +248,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos;
Expand All @@ -253,7 +258,6 @@
151FC0F213D34B7A007DC282 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJCPP_ARC_ABI = NO;
CODE_SIGN_IDENTITY = "iPhone Developer";
Expand Down
2 changes: 1 addition & 1 deletion Toast.xcodeproj/xcshareddata/xcschemes/ToastTest.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0500"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
20 changes: 10 additions & 10 deletions Toast/Toast/Toast+UIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,31 @@ - (void)makeToast:(NSString *)message {
[self makeToast:message duration:CSToastDefaultDuration position:CSToastDefaultPosition];
}

- (void)makeToast:(NSString *)message duration:(NSTimeInterval)interval position:(id)position {
- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position {
UIView *toast = [self viewForMessage:message title:nil image:nil];
[self showToast:toast duration:interval position:position];
[self showToast:toast duration:duration position:position];
}

- (void)makeToast:(NSString *)message duration:(NSTimeInterval)interval position:(id)position title:(NSString *)title {
- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position title:(NSString *)title {
UIView *toast = [self viewForMessage:message title:title image:nil];
[self showToast:toast duration:interval position:position];
[self showToast:toast duration:duration position:position];
}

- (void)makeToast:(NSString *)message duration:(NSTimeInterval)interval position:(id)position image:(UIImage *)image {
- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position image:(UIImage *)image {
UIView *toast = [self viewForMessage:message title:nil image:image];
[self showToast:toast duration:interval position:position];
[self showToast:toast duration:duration position:position];
}

- (void)makeToast:(NSString *)message duration:(NSTimeInterval)interval position:(id)position title:(NSString *)title image:(UIImage *)image {
- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position title:(NSString *)title image:(UIImage *)image {
UIView *toast = [self viewForMessage:message title:title image:image];
[self showToast:toast duration:interval position:position];
[self showToast:toast duration:duration position:position];
}

- (void)showToast:(UIView *)toast {
[self showToast:toast duration:CSToastDefaultDuration position:CSToastDefaultPosition];
}

- (void)showToast:(UIView *)toast duration:(NSTimeInterval)interval position:(id)point {
- (void)showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)point {
toast.center = [self centerPointForPosition:point withToast:toast];
toast.alpha = 0.0;

Expand All @@ -115,7 +115,7 @@ - (void)showToast:(UIView *)toast duration:(NSTimeInterval)interval position:(id
animations:^{
toast.alpha = 1.0;
} completion:^(BOOL finished) {
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:interval target:self selector:@selector(toastTimerDidFinish:) userInfo:toast repeats:NO];
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:duration target:self selector:@selector(toastTimerDidFinish:) userInfo:toast repeats:NO];
// associate the timer with the toast view
objc_setAssociatedObject (toast, &CSToastTimerKey, timer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}];
Expand Down

0 comments on commit d3a241e

Please sign in to comment.