Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ @implementation LaunchIntroductionView
BOOL isScrollOut;//在最后一页再次滑动是否隐藏引导页
CGRect enterBtnFrame;
NSString *enterBtnImage;
static LaunchIntroductionView *launch = nil;
NSString *storyboard;

#pragma mark - 创建对象-->>不带button
+(instancetype)sharedWithImages:(NSArray *)imageNames{
images = imageNames;
isScrollOut = YES;
launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
LaunchIntroductionView *launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
launch.backgroundColor = [UIColor whiteColor];
return launch;
}
Expand All @@ -41,7 +40,7 @@ +(instancetype)sharedWithImages:(NSArray *)imageNames buttonImage:(NSString *)bu
isScrollOut = NO;
enterBtnFrame = frame;
enterBtnImage = buttonImageName;
launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
LaunchIntroductionView *launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
launch.backgroundColor = [UIColor whiteColor];
return launch;
}
Expand All @@ -50,7 +49,7 @@ + (instancetype)sharedWithStoryboardName:(NSString *)storyboardName images:(NSAr
images = imageNames;
storyboard = storyboardName;
isScrollOut = YES;
launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
LaunchIntroductionView *launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
launch.backgroundColor = [UIColor whiteColor];
return launch;
}
Expand All @@ -61,7 +60,7 @@ + (instancetype)sharedWithStoryboard:(NSString *)storyboardName images:(NSArray
enterBtnFrame = frame;
storyboard = storyboardName;
enterBtnImage = buttonImageName;
launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
LaunchIntroductionView *launch = [[LaunchIntroductionView alloc] initWithFrame:CGRectMake(0, 0, kScreen_width, kScreen_height)];
launch.backgroundColor = [UIColor whiteColor];
return launch;
}
Expand Down Expand Up @@ -194,4 +193,10 @@ -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NS
}
}

- (void)dealloc
{
[self removeObserver:self forKeyPath:@"currentColor"];
[self removeObserver:self forKeyPath:@"nomalColor"];
}

@end