Skip to content

Commit 9fb8a10

Browse files
committed
从任务页面去到项目
1 parent 05d6c87 commit 9fb8a10

18 files changed

Lines changed: 1712 additions & 7 deletions

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,12 @@
11821182
927AFF581BFF755200AAE593 /* ExchangeGoodsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 927AFF571BFF755200AAE593 /* ExchangeGoodsViewController.m */; };
11831183
927AFF5B1BFF772A00AAE593 /* ShopOrderTextFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 927AFF5A1BFF772A00AAE593 /* ShopOrderTextFieldCell.m */; };
11841184
B12B63F61FE8A77200ACFDCC /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B12B63F51FE8A77200ACFDCC /* WeiboSDK.bundle */; };
1185+
B12B63F91FE8FF0400ACFDCC /* MartFunctionTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B63F81FE8FF0300ACFDCC /* MartFunctionTipView.m */; };
1186+
B12B64061FE900D400ACFDCC /* AMPopTip+Animation.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B63FB1FE900D400ACFDCC /* AMPopTip+Animation.m */; };
1187+
B12B64071FE900D400ACFDCC /* AMPopTip.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B63FD1FE900D400ACFDCC /* AMPopTip.m */; };
1188+
B12B64081FE900D400ACFDCC /* AMPopTip+Entrance.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B64021FE900D400ACFDCC /* AMPopTip+Entrance.m */; };
1189+
B12B64091FE900D400ACFDCC /* AMPopTip+Draw.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B64031FE900D400ACFDCC /* AMPopTip+Draw.m */; };
1190+
B12B640A1FE900D400ACFDCC /* AMPopTip+Exit.m in Sources */ = {isa = PBXBuildFile; fileRef = B12B64051FE900D400ACFDCC /* AMPopTip+Exit.m */; };
11851191
B14689B41EE100B200B01371 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B14689A41EE100B200B01371 /* [email protected] */; };
11861192
B14689B51EE100B200B01371 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B14689A51EE100B200B01371 /* [email protected] */; };
11871193
B14689B61EE100B200B01371 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = B14689A61EE100B200B01371 /* [email protected] */; };
@@ -3155,6 +3161,19 @@
31553161
927AFF591BFF772A00AAE593 /* ShopOrderTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopOrderTextFieldCell.h; sourceTree = "<group>"; };
31563162
927AFF5A1BFF772A00AAE593 /* ShopOrderTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopOrderTextFieldCell.m; sourceTree = "<group>"; };
31573163
B12B63F51FE8A77200ACFDCC /* WeiboSDK.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = WeiboSDK.bundle; sourceTree = "<group>"; };
3164+
B12B63F71FE8FF0300ACFDCC /* MartFunctionTipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MartFunctionTipView.h; sourceTree = "<group>"; };
3165+
B12B63F81FE8FF0300ACFDCC /* MartFunctionTipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MartFunctionTipView.m; sourceTree = "<group>"; };
3166+
B12B63FB1FE900D400ACFDCC /* AMPopTip+Animation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AMPopTip+Animation.m"; sourceTree = "<group>"; };
3167+
B12B63FC1FE900D400ACFDCC /* AMPopTip+Entrance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AMPopTip+Entrance.h"; sourceTree = "<group>"; };
3168+
B12B63FD1FE900D400ACFDCC /* AMPopTip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPopTip.m; sourceTree = "<group>"; };
3169+
B12B63FE1FE900D400ACFDCC /* AMPopTipDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPopTipDefaults.h; sourceTree = "<group>"; };
3170+
B12B63FF1FE900D400ACFDCC /* AMPopTip+Draw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AMPopTip+Draw.h"; sourceTree = "<group>"; };
3171+
B12B64001FE900D400ACFDCC /* AMPopTip+Exit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AMPopTip+Exit.h"; sourceTree = "<group>"; };
3172+
B12B64011FE900D400ACFDCC /* AMPopTip+Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AMPopTip+Animation.h"; sourceTree = "<group>"; };
3173+
B12B64021FE900D400ACFDCC /* AMPopTip+Entrance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AMPopTip+Entrance.m"; sourceTree = "<group>"; };
3174+
B12B64031FE900D400ACFDCC /* AMPopTip+Draw.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AMPopTip+Draw.m"; sourceTree = "<group>"; };
3175+
B12B64041FE900D400ACFDCC /* AMPopTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPopTip.h; sourceTree = "<group>"; };
3176+
B12B64051FE900D400ACFDCC /* AMPopTip+Exit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AMPopTip+Exit.m"; sourceTree = "<group>"; };
31583177
B14689A41EE100B200B01371 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
31593178
B14689A51EE100B200B01371 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
31603179
B14689A61EE100B200B01371 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -6015,6 +6034,7 @@
60156034
8EA6D03E19E240C40076D59C /* Vendor */ = {
60166035
isa = PBXGroup;
60176036
children = (
6037+
B12B63FA1FE900D400ACFDCC /* AMPopTip */,
60186038
B12B63F41FE8A77200ACFDCC /* SinaSDK */,
60196039
B19D4EF81F7247BA00C598F3 /* AlipaySDK */,
60206040
D031F5D81BFAD6690008E964 /* FRDLivelyButton */,
@@ -6163,6 +6183,8 @@
61636183
09A058971E0AAA5300C1CA3F /* ScreenView.m */,
61646184
B1BCB8921FCE662A0098B87B /* NSLayoutConstraintLine.h */,
61656185
B1BCB8911FCE662A0098B87B /* NSLayoutConstraintLine.m */,
6186+
B12B63F71FE8FF0300ACFDCC /* MartFunctionTipView.h */,
6187+
B12B63F81FE8FF0300ACFDCC /* MartFunctionTipView.m */,
61666188
);
61676189
path = Views;
61686190
sourceTree = "<group>";
@@ -6477,6 +6499,24 @@
64776499
path = SinaSDK;
64786500
sourceTree = "<group>";
64796501
};
6502+
B12B63FA1FE900D400ACFDCC /* AMPopTip */ = {
6503+
isa = PBXGroup;
6504+
children = (
6505+
B12B63FB1FE900D400ACFDCC /* AMPopTip+Animation.m */,
6506+
B12B63FC1FE900D400ACFDCC /* AMPopTip+Entrance.h */,
6507+
B12B63FD1FE900D400ACFDCC /* AMPopTip.m */,
6508+
B12B63FE1FE900D400ACFDCC /* AMPopTipDefaults.h */,
6509+
B12B63FF1FE900D400ACFDCC /* AMPopTip+Draw.h */,
6510+
B12B64001FE900D400ACFDCC /* AMPopTip+Exit.h */,
6511+
B12B64011FE900D400ACFDCC /* AMPopTip+Animation.h */,
6512+
B12B64021FE900D400ACFDCC /* AMPopTip+Entrance.m */,
6513+
B12B64031FE900D400ACFDCC /* AMPopTip+Draw.m */,
6514+
B12B64041FE900D400ACFDCC /* AMPopTip.h */,
6515+
B12B64051FE900D400ACFDCC /* AMPopTip+Exit.m */,
6516+
);
6517+
path = AMPopTip;
6518+
sourceTree = "<group>";
6519+
};
64806520
B14689A31EE100B200B01371 /* vip */ = {
64816521
isa = PBXGroup;
64826522
children = (
@@ -7664,6 +7704,7 @@
76647704
4E5C06EB1AC4009100F427C5 /* CannotLoginViewController.m in Sources */,
76657705
927AFF381BFF1CC200AAE593 /* ShopViewController.m in Sources */,
76667706
1309BA021CA2EF370034C7A3 /* Reviewer.m in Sources */,
7707+
B12B640A1FE900D400ACFDCC /* AMPopTip+Exit.m in Sources */,
76677708
8EA6D12819E240C40076D59C /* AppDelegate.m in Sources */,
76687709
7EB02FE51B6D0F3E00D2166C /* AudioAmrUtil.m in Sources */,
76697710
4ECE8AFF1A3946C10021E29C /* Coding_NetAPIManager.m in Sources */,
@@ -7721,6 +7762,7 @@
77217762
4E4D6A791B1C6C7800FD2E49 /* MRPRDetailCell.m in Sources */,
77227763
8EF643CA19FF7E2900F7EEB0 /* TopicContentCell.m in Sources */,
77237764
4E0B9A371BAD377600D57D54 /* ForkTreeCell.m in Sources */,
7765+
B12B64071FE900D400ACFDCC /* AMPopTip.m in Sources */,
77247766
4E4D6A6A1B1C688200FD2E49 /* MRPRAcceptViewController.m in Sources */,
77257767
4ECE8AE81A3943E80021E29C /* UIView+Common.m in Sources */,
77267768
4EA7F15E1A6D192B00A046BD /* SDWebImageDownloaderOperation.m in Sources */,
@@ -7826,6 +7868,7 @@
78267868
8E1C3DEA19E7D58A00EF3032 /* AbstractActionSheetPicker.m in Sources */,
78277869
8EA6D1AF19E240C40076D59C /* CodingTips.m in Sources */,
78287870
4E4D6A5B1B1C5DDF00FD2E49 /* MRPRCommentCCell.m in Sources */,
7871+
B12B64061FE900D400ACFDCC /* AMPopTip+Animation.m in Sources */,
78297872
8EF643C219FF7E2900F7EEB0 /* TaskCommentTopCell.m in Sources */,
78307873
4E4D6A611B1C65C100FD2E49 /* MRPRCommitsViewController.m in Sources */,
78317874
B1C871541EADF4D4003DACF0 /* UITableViewCell+Common.m in Sources */,
@@ -7925,6 +7968,7 @@
79257968
4E6CBE511D8E962300644086 /* TopicAnswerDetailViewController.m in Sources */,
79267969
8EA6D14819E240C40076D59C /* UsersViewController.m in Sources */,
79277970
4E94C4FF1B4D2B9300EB668A /* MenuButton.m in Sources */,
7971+
B12B64091FE900D400ACFDCC /* AMPopTip+Draw.m in Sources */,
79287972
4ED4B49D1D8295F600EED8C6 /* TeamViewController.m in Sources */,
79297973
4EF3741C1BB1258600DDA662 /* LocalFileViewController.m in Sources */,
79307974
3A3878401AE295970078D5DE /* ResetLabelCell.m in Sources */,
@@ -7942,6 +7986,7 @@
79427986
4E6D718A1A75F00E005AD988 /* YLImageView.m in Sources */,
79437987
4E095A591B690494008DC439 /* CodingBanner.m in Sources */,
79447988
9233997B1C00C55600F29E04 /* ShopOrderModel.m in Sources */,
7989+
B12B63F91FE8FF0400ACFDCC /* MartFunctionTipView.m in Sources */,
79457990
B19D4EEE1F6FCEAC00C598F3 /* CodingSkill.m in Sources */,
79467991
923399721C00A9EF00F29E04 /* DashesLineView.m in Sources */,
79477992
8EA6D1C119E240C40076D59C /* Tweets.m in Sources */,
@@ -7998,6 +8043,7 @@
79988043
8E1C3E0819E8DFE300EF3032 /* AboutViewController.m in Sources */,
79998044
4E87DDFD1D813B1E00D1B5B1 /* MeRootUserCell.m in Sources */,
80008045
9233996C1C00524A00F29E04 /* ShopGoods.m in Sources */,
8046+
B12B64081FE900D400ACFDCC /* AMPopTip+Entrance.m in Sources */,
80018047
4E0022861B720966005308DE /* PointRecords.m in Sources */,
80028048
4E6BA2D71A1EE6AF005FD721 /* AFHTTPRequestOperation.m in Sources */,
80038049
4EF8181F1B05C9D8005F974B /* ProjectLineNoteActivity.m in Sources */,

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>4.9</string>
20+
<string>4.9.5</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -37,7 +37,7 @@
3737
</dict>
3838
</array>
3939
<key>CFBundleVersion</key>
40-
<string>4.9.201712061200</string>
40+
<string>4.9.5.201712061200</string>
4141
<key>ITSAppUsesNonExemptEncryption</key>
4242
<false/>
4343
<key>LSApplicationQueriesSchemes</key>

Coding_iOS/Controllers/EditTaskViewController.m

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
#import "ProjectToChooseListViewController.h"
2424
#import "EditLabelViewController.h"
2525
#import "TaskResourceReferenceViewController.h"
26+
#import "NProjectViewController.h"
27+
#import "FunctionTipsManager.h"
28+
#import "MartFunctionTipView.h"
2629

2730
@interface EditTaskViewController ()<TTTAttributedLabelDelegate>
2831
@property (strong, nonatomic) UITableView *myTableView;
@@ -54,10 +57,7 @@ - (void)viewDidLoad
5457
_myMsgInputView = [UIMessageInputView messageInputViewWithType:UIMessageInputViewContentTypeTask];
5558
_myMsgInputView.isAlwaysShow = YES;
5659
_myMsgInputView.delegate = self;
57-
58-
[self queryToRefreshTaskDetail];
5960
}
60-
[self configTitle];
6161

6262
_myTableView = ({
6363
UITableView *tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped];
@@ -110,7 +110,22 @@ - (void)configTitle{
110110
if (_myCopyTask.handleType > TaskHandleTypeEdit) {
111111
self.title = @"创建任务";
112112
}else{
113-
self.title = _myTask.project.name;
113+
UILabel *titleL = [UILabel labelWithFont:[UIFont systemFontOfSize:kNavTitleFontSize] textColor:kColorNavTitle];
114+
titleL.text = _myTask.project.name;
115+
titleL.userInteractionEnabled = YES;
116+
__weak typeof(self) weakSelf = self;
117+
[titleL bk_whenTapped:^{
118+
NProjectViewController *vc = [[NProjectViewController alloc] init];
119+
vc.myProject = weakSelf.myTask.project;
120+
[weakSelf.navigationController pushViewController:vc animated:YES];
121+
}];
122+
[titleL sizeToFit];
123+
self.navigationItem.titleView = titleL;
124+
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_TaskTitleViewTap]) {
125+
[MartFunctionTipView showText:@"点击标题可跳转到项目首页哦" direction:AMPopTipDirectionDown bubbleOffset:0 inView:self.view fromFrame:CGRectMake(kScreen_Width/ 2, 0, 0, 0) dismissHandler:^{
126+
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_TaskTitleViewTap];
127+
}];
128+
}
114129
}
115130
}
116131

@@ -131,6 +146,12 @@ - (void)viewDidAppear:(BOOL)animated{
131146
[_myMsgInputView prepareToShow];
132147
}
133148
[self.myTableView reloadData];
149+
150+
if (_myCopyTask.handleType == TaskHandleTypeEdit && !_myCopyTask.activityList) {
151+
[self queryToRefreshTaskDetail];
152+
}else{
153+
[self configTitle];
154+
}
134155
}
135156

136157
- (void)didReceiveMemoryWarning

Coding_iOS/Util/Manager/FunctionTipsManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ static NSString *kFunctionTipStr_StartLinkPrefix = @"StartLinkPrefix";
2929
//static NSString *kFunctionTipStr_File_3V = @"File_3V";
3030
//version 4.5
3131
static NSString *kFunctionTipStr_Me_Shop = @"Me_Shop";
32+
//version 4.9.5
33+
static NSString *kFunctionTipStr_TaskTitleViewTap = @"TaskTitleViewTap";
3234

3335

3436
#import <Foundation/Foundation.h>

Coding_iOS/Util/Manager/FunctionTipsManager.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ - (instancetype)init
3333
_tipsDict = [@{kFunctionTipStr_Version: kVersionBuild_Coding,
3434
//Function Need To Tip
3535
// kFunctionTipStr_File_3V: @(YES),
36-
kFunctionTipStr_Me_Shop: @(YES),
36+
// kFunctionTipStr_Me_Shop: @(YES),
37+
kFunctionTipStr_TaskTitleViewTap: @(YES),
3738
} mutableCopy];
3839
[_tipsDict writeToFile:[self p_cacheFilePath] atomically:YES];
3940
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// AMPopTip+Animation.h
3+
// AMPopTip
4+
//
5+
// Created by Andrea Mazzini on 10/06/15.
6+
// Copyright (c) 2015 Fancy Pixel. All rights reserved.
7+
//
8+
9+
#import "AMPopTip.h"
10+
11+
@interface AMPopTip (Animation)
12+
13+
/** Start the popover action animation
14+
*
15+
* Starts the popover action animation. Does nothing if the popover wasn't animating in the first place.
16+
*/
17+
- (void)performActionAnimation;
18+
19+
/** Stops the popover action animation
20+
*
21+
* Stops the popover action animation. Does nothing if the popover wasn't animating in the first place.
22+
*/
23+
- (void)dismissActionAnimation;
24+
25+
@end
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
//
2+
// AMPopTip+Animation.m
3+
// AMPopTip
4+
//
5+
// Created by Andrea Mazzini on 10/06/15.
6+
// Copyright (c) 2015 Fancy Pixel. All rights reserved.
7+
//
8+
9+
#import "AMPopTip+Animation.h"
10+
#import <objc/runtime.h>
11+
12+
@implementation AMPopTip (Animation)
13+
14+
- (void)setShouldBounce:(BOOL)shouldBounce { objc_setAssociatedObject(self, @selector(shouldBounce), [NSNumber numberWithBool:shouldBounce], OBJC_ASSOCIATION_RETAIN);}
15+
- (BOOL)shouldBounce { return [objc_getAssociatedObject(self, @selector(shouldBounce)) boolValue]; }
16+
17+
- (void)performActionAnimation {
18+
switch (self.actionAnimation) {
19+
case AMPopTipActionAnimationBounce:
20+
self.shouldBounce = YES;
21+
[self bounceAnimation];
22+
break;
23+
case AMPopTipActionAnimationFloat:
24+
[self floatAnimation];
25+
break;
26+
case AMPopTipActionAnimationPulse:
27+
[self pulseAnimation];
28+
break;
29+
case AMPopTipActionAnimationNone:
30+
return;
31+
break;
32+
default:
33+
break;
34+
}
35+
}
36+
37+
- (void)floatAnimation {
38+
CGFloat xOffset = 0;
39+
CGFloat yOffset = 0;
40+
switch (self.direction) {
41+
case AMPopTipDirectionUp:
42+
yOffset = -self.actionFloatOffset;
43+
break;
44+
case AMPopTipDirectionDown:
45+
yOffset = self.actionFloatOffset;
46+
break;
47+
case AMPopTipDirectionLeft:
48+
xOffset = -self.actionFloatOffset;
49+
break;
50+
case AMPopTipDirectionRight:
51+
xOffset = self.actionFloatOffset;
52+
break;
53+
case AMPopTipDirectionNone:
54+
yOffset = -self.actionFloatOffset;
55+
break;
56+
}
57+
58+
[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionAllowUserInteraction) animations:^{
59+
self.transform = CGAffineTransformMakeTranslation(xOffset, yOffset);
60+
} completion:nil];
61+
}
62+
63+
- (void)bounceAnimation {
64+
CGFloat xOffset = 0;
65+
CGFloat yOffset = 0;
66+
switch (self.direction) {
67+
case AMPopTipDirectionUp:
68+
yOffset = -self.actionBounceOffset;
69+
break;
70+
case AMPopTipDirectionDown:
71+
yOffset = self.actionBounceOffset;
72+
break;
73+
case AMPopTipDirectionLeft:
74+
xOffset = -self.actionBounceOffset;
75+
break;
76+
case AMPopTipDirectionRight:
77+
xOffset = self.actionBounceOffset;
78+
break;
79+
case AMPopTipDirectionNone:
80+
yOffset = -self.actionBounceOffset;
81+
break;
82+
}
83+
84+
[UIView animateWithDuration:(self.actionAnimationIn / 10) delay:self.actionDelayIn options:(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionAllowUserInteraction) animations:^{
85+
self.transform = CGAffineTransformMakeTranslation(xOffset, yOffset);
86+
} completion:^(BOOL finished) {
87+
[UIView animateWithDuration:(self.actionAnimationIn - self.actionAnimationIn / 10) delay:0 usingSpringWithDamping:0.4 initialSpringVelocity:1 options:UIViewAnimationOptionAllowUserInteraction animations:^{
88+
self.transform = CGAffineTransformIdentity;
89+
} completion:^(BOOL done) {
90+
if (self.shouldBounce && done) {
91+
[self bounceAnimation];
92+
}
93+
}];
94+
}];
95+
}
96+
97+
- (void)pulseAnimation {
98+
[UIView animateWithDuration:(self.actionAnimationIn / 2) delay:self.actionDelayIn options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAutoreverse | UIViewAnimationOptionAllowUserInteraction) animations:^{
99+
self.transform = CGAffineTransformMakeScale(self.actionPulseOffset, self.actionPulseOffset);
100+
} completion:nil];
101+
}
102+
103+
- (void)dismissActionAnimation {
104+
self.shouldBounce = NO;
105+
[UIView animateWithDuration:(self.actionAnimationOut / 2) delay:self.actionDelayOut options:UIViewAnimationOptionBeginFromCurrentState animations:^{
106+
self.transform = CGAffineTransformIdentity;
107+
} completion:^(BOOL finished) {
108+
[self.layer removeAllAnimations];
109+
}];
110+
}
111+
112+
@end
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// AMPopTip+Draw.h
3+
// AMPopTip
4+
//
5+
// Created by Andrea Mazzini on 10/06/15.
6+
// Copyright (c) 2015 Fancy Pixel. All rights reserved.
7+
//
8+
9+
#import "AMPopTip.h"
10+
11+
@interface AMPopTip (Draw)
12+
13+
/** Poptip's Bezier path
14+
*
15+
* Returns the path used to draw the poptip, used internally by the poptip.
16+
*
17+
* @param rect The rect holding the poptip
18+
* @param direction The direction of the poptip appearance
19+
* @return UIBezierPath The poptip's path
20+
*/
21+
- (nonnull UIBezierPath *)pathWithRect:(CGRect)rect direction:(AMPopTipDirection)direction;
22+
23+
@end

0 commit comments

Comments
 (0)