Skip to content

Commit

Permalink
极大的精简了框架
Browse files Browse the repository at this point in the history
  • Loading branch information
时点软件 冯成林 authored and 时点软件 冯成林 committed Nov 30, 2015
1 parent b4834f4 commit 18bbb12
Show file tree
Hide file tree
Showing 75 changed files with 53 additions and 5,934 deletions.
376 changes: 6 additions & 370 deletions CoreNewFeatureVC.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
3 changes: 1 addition & 2 deletions CoreNewFeatureVC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#import "AppDelegate.h"
#import "CoreNewFeatureVC.h"
#import "CALayer+Transition.h"


@interface AppDelegate ()

Expand Down Expand Up @@ -60,7 +60,6 @@ -(void)enter{
UIViewController *vc = [[UIViewController alloc] init];
vc.view.backgroundColor = [UIColor brownColor];
self.window.rootViewController = vc;
[self.window.layer transitionWithAnimType:TransitionAnimTypeRamdom subType:TransitionSubtypesFromRamdom curve:TransitionCurveRamdom duration:2.0f];
}


Expand Down
15 changes: 15 additions & 0 deletions CoreNewFeatureVC/CoreNewFeatureVC/Category/UIView+NFLayout.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// UIView+CoreListLayout.h
// CoreList
//
// Created by 冯成林 on 15/11/28.
// Copyright © 2015年 muxi. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (NFLayout)

-(void)autoLayoutFillSuperView;

@end
26 changes: 26 additions & 0 deletions CoreNewFeatureVC/CoreNewFeatureVC/Category/UIView+NFLayout.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// UIView+CoreListLayout.m
// CoreList
//
// Created by 冯成林 on 15/11/28.
// Copyright © 2015年 muxi. All rights reserved.
//

#import "UIView+NFLayout.h"

@implementation UIView (NFLayout)

-(void)autoLayoutFillSuperView {

if(self.superview == nil) {return;}

self.translatesAutoresizingMaskIntoConstraints = NO;

NSDictionary *views = @{@"v":self};

NSArray *v_ver = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-0-[v]-0-|" options:0 metrics:nil views:views];
NSArray *v_hor = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|-0-[v]-0-|" options:0 metrics:nil views:views];
[self.superview addConstraints:v_ver];[self.superview addConstraints:v_hor];
}

@end
11 changes: 5 additions & 6 deletions CoreNewFeatureVC/CoreNewFeatureVC/CoreNewFeatureVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
//

#import "CoreNewFeatureVC.h"
#import "UIView+Masony.h"
#import "NewFeatureScrollView.h"
#import "NewFeatureImageV.h"
#import "UIApplication+Extend.h"
#import "CoreArchive.h"
#import "UIView+NFLayout.h"


NSString *const NewFeatureVersionKey = @"NewFeatureVersionKey";
Expand Down Expand Up @@ -68,7 +67,7 @@ -(void)saveVersion{
NSString *versionValueStringForSystemNow=[UIApplication sharedApplication].version;

//保存版本号
[CoreArchive setStr:versionValueStringForSystemNow key:NewFeatureVersionKey];
[[NSUserDefaults standardUserDefaults] setObject:versionValueStringForSystemNow forKey:NewFeatureVersionKey];
}


Expand All @@ -87,7 +86,7 @@ -(void)vcPrepare{
[self.view addSubview:scrollView];

//添加约束
[scrollView masViewAddConstraintMakeEqualSuperViewWithInsets:UIEdgeInsetsZero];
[scrollView autoLayoutFillSuperView];

//添加图片
[self imageViewsPrepare];
Expand Down Expand Up @@ -150,7 +149,7 @@ +(BOOL)canShowNewFeature{
NSString *versionValueStringForSystemNow=[UIApplication sharedApplication].version;

//读取本地版本号
NSString *versionLocal = [CoreArchive strForKey:NewFeatureVersionKey];
NSString *versionLocal = [[NSUserDefaults standardUserDefaults] objectForKey:NewFeatureVersionKey];

if(versionLocal!=nil && [versionValueStringForSystemNow isEqualToString:versionLocal]){//说明有本地版本记录,且和当前系统版本一致

Expand All @@ -159,7 +158,7 @@ +(BOOL)canShowNewFeature{
}else{//无本地版本记录或本地版本记录与当前系统版本不一致

//保存
[CoreArchive setStr:versionValueStringForSystemNow key:NewFeatureVersionKey];
[[NSUserDefaults standardUserDefaults] setObject:versionValueStringForSystemNow forKey:NewFeatureVersionKey];

return YES;
}
Expand Down
42 changes: 0 additions & 42 deletions CoreNewFeatureVC/FrameWorks/CoreArchive/Category/NSString+File.h

This file was deleted.

62 changes: 0 additions & 62 deletions CoreNewFeatureVC/FrameWorks/CoreArchive/Category/NSString+File.m

This file was deleted.

93 changes: 0 additions & 93 deletions CoreNewFeatureVC/FrameWorks/CoreArchive/CoreArchive.h

This file was deleted.

Loading

0 comments on commit 18bbb12

Please sign in to comment.