Skip to content

Commit 75b4ce5

Browse files
author
zhangyazhe
committed
no message
1 parent ac396b9 commit 75b4ce5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

ghost/ghost.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@
288288
buildSettings = {
289289
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
290290
CODE_SIGN_STYLE = Automatic;
291+
DEVELOPMENT_TEAM = F5L4K9TS2N;
291292
INFOPLIST_FILE = ghost/Info.plist;
293+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
292294
LD_RUNPATH_SEARCH_PATHS = (
293295
"$(inherited)",
294296
"@executable_path/Frameworks",
@@ -304,7 +306,9 @@
304306
buildSettings = {
305307
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
306308
CODE_SIGN_STYLE = Automatic;
309+
DEVELOPMENT_TEAM = F5L4K9TS2N;
307310
INFOPLIST_FILE = ghost/Info.plist;
311+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
308312
LD_RUNPATH_SEARCH_PATHS = (
309313
"$(inherited)",
310314
"@executable_path/Frameworks",

ghost/ghost/ViewController.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ - (void)viewDidLoad {
4242
*/
4343
- (void)panGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer{
4444
//获取拖拽手势在self.view 的拖拽姿态
45-
CGPoint translation = [panGestureRecognizer translationInView:self.view.window];
45+
CGPoint translation = [panGestureRecognizer translationInView:self.view];
4646
switch (panGestureRecognizer.state) {
4747
case UIGestureRecognizerStateBegan:{
4848
//记录起始点位置
@@ -60,7 +60,7 @@ - (void)panGestureRecognizer:(UIPanGestureRecognizer *)panGestureRecognizer{
6060
//改变panGestureRecognizer.view的中心点 就是self.imageView的中心点
6161
panGestureRecognizer.view.center = CGPointMake(panGestureRecognizer.view.center.x + translation.x, panGestureRecognizer.view.center.y + translation.y);
6262
//重置拖拽手势的姿态
63-
[panGestureRecognizer setTranslation:CGPointZero inView:self.view.window];
63+
[panGestureRecognizer setTranslation:CGPointZero inView:self.view];
6464

6565
[self.ghostList enumerateObjectsUsingBlock:^(UIImageView * obj, NSUInteger idx, BOOL * _Nonnull stop) {
6666
[UIView animateWithDuration:0.1 delay:0.1 * idx options:UIViewAnimationOptionCurveEaseInOut animations:^{
@@ -87,8 +87,8 @@ -(void)addItem{
8787
img.layer.cornerRadius = _tx.layer.cornerRadius;
8888
img.layer.masksToBounds = YES;
8989
img.alpha = 1 - (i * 0.15);
90-
img.transform = CGAffineTransformMakeScale(1 - 0.1 * i,1 - 0.1 * i);
91-
[self.view.window addSubview:img];
90+
img.transform = CGAffineTransformMakeScale(1 - 0.05 * i,1 - 0.05 * i);
91+
[self.view addSubview:img];
9292
[self.ghostList addObject:img];
9393
}
9494
}

0 commit comments

Comments
 (0)