Skip to content

Commit 66d229f

Browse files
authored
Merge pull request MortimerGoro#313 from Maryom/master
Got rid from Block implicitly warning
2 parents a08fdd0 + 8e5b8ef commit 66d229f

File tree

4 files changed

+57
-27
lines changed

4 files changed

+57
-27
lines changed

MGSwipeTableCell.xcodeproj/project.pbxproj

+23-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
C63EE5621BBA07ED008F46BB /* Project object */ = {
101101
isa = PBXProject;
102102
attributes = {
103-
LastUpgradeCheck = 0700;
103+
LastUpgradeCheck = 0940;
104104
ORGANIZATIONNAME = mortimergoro;
105105
TargetAttributes = {
106106
C63EE56A1BBA07ED008F46BB = {
@@ -156,13 +156,23 @@
156156
CLANG_CXX_LIBRARY = "libc++";
157157
CLANG_ENABLE_MODULES = YES;
158158
CLANG_ENABLE_OBJC_ARC = YES;
159+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
159160
CLANG_WARN_BOOL_CONVERSION = YES;
161+
CLANG_WARN_COMMA = YES;
160162
CLANG_WARN_CONSTANT_CONVERSION = YES;
163+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
161164
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
162165
CLANG_WARN_EMPTY_BODY = YES;
163166
CLANG_WARN_ENUM_CONVERSION = YES;
167+
CLANG_WARN_INFINITE_RECURSION = YES;
164168
CLANG_WARN_INT_CONVERSION = YES;
169+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
170+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
171+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
165172
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
173+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
174+
CLANG_WARN_STRICT_PROTOTYPES = YES;
175+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
166176
CLANG_WARN_UNREACHABLE_CODE = YES;
167177
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
168178
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -203,13 +213,23 @@
203213
CLANG_CXX_LIBRARY = "libc++";
204214
CLANG_ENABLE_MODULES = YES;
205215
CLANG_ENABLE_OBJC_ARC = YES;
216+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
206217
CLANG_WARN_BOOL_CONVERSION = YES;
218+
CLANG_WARN_COMMA = YES;
207219
CLANG_WARN_CONSTANT_CONVERSION = YES;
220+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
208221
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
209222
CLANG_WARN_EMPTY_BODY = YES;
210223
CLANG_WARN_ENUM_CONVERSION = YES;
224+
CLANG_WARN_INFINITE_RECURSION = YES;
211225
CLANG_WARN_INT_CONVERSION = YES;
226+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
227+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
228+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212229
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
230+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
231+
CLANG_WARN_STRICT_PROTOTYPES = YES;
232+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
213233
CLANG_WARN_UNREACHABLE_CODE = YES;
214234
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
215235
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -239,6 +259,7 @@
239259
C63EE5801BBA07ED008F46BB /* Debug */ = {
240260
isa = XCBuildConfiguration;
241261
buildSettings = {
262+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
242263
DEFINES_MODULE = YES;
243264
DYLIB_COMPATIBILITY_VERSION = 1;
244265
DYLIB_CURRENT_VERSION = 1;
@@ -256,6 +277,7 @@
256277
C63EE5811BBA07ED008F46BB /* Release */ = {
257278
isa = XCBuildConfiguration;
258279
buildSettings = {
280+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
259281
DEFINES_MODULE = YES;
260282
DYLIB_COMPATIBILITY_VERSION = 1;
261283
DYLIB_CURRENT_VERSION = 1;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

MGSwipeTableCell.xcodeproj/xcshareddata/xcschemes/MGSwipeTableCell.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0700"
3+
LastUpgradeVersion = "0940"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

MGSwipeTableCell/MGSwipeTableCell.m

+25-25
Original file line numberDiff line numberDiff line change
@@ -253,30 +253,30 @@ -(void) expandToOffset:(CGFloat) offset settings:(MGSwipeExpansionSettings*) set
253253

254254
CGFloat duration = _fromLeft ? _cell.leftExpansion.animationDuration : _cell.rightExpansion.animationDuration;
255255
[UIView animateWithDuration: duration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
256-
_expandedButton.hidden = NO;
257-
258-
if (_expansionLayout == MGSwipeExpansionLayoutCenter) {
259-
_expandedButtonBoundsCopy = _expandedButton.bounds;
260-
_expandedButton.layer.mask = nil;
261-
_expandedButton.layer.transform = CATransform3DIdentity;
262-
_expandedButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
263-
[_expandedButton.superview bringSubviewToFront:_expandedButton];
264-
_expandedButton.frame = _container.bounds;
265-
_expansionBackground.frame = [self expansionBackgroundRect:_expandedButton];
256+
self->_expandedButton.hidden = NO;
257+
258+
if (self->_expansionLayout == MGSwipeExpansionLayoutCenter) {
259+
self->_expandedButtonBoundsCopy = self->_expandedButton.bounds;
260+
self->_expandedButton.layer.mask = nil;
261+
self->_expandedButton.layer.transform = CATransform3DIdentity;
262+
self->_expandedButton.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
263+
[self->_expandedButton.superview bringSubviewToFront:self->_expandedButton];
264+
self->_expandedButton.frame = self->_container.bounds;
265+
self->_expansionBackground.frame = [self expansionBackgroundRect:self->_expandedButton];
266266
}
267-
else if (_expansionLayout == MGSwipeExpansionLayoutNone) {
268-
[_expandedButton.superview bringSubviewToFront:_expandedButton];
269-
_expansionBackground.frame = _container.bounds;
267+
else if (self->_expansionLayout == MGSwipeExpansionLayoutNone) {
268+
[self->_expandedButton.superview bringSubviewToFront:self->_expandedButton];
269+
self->_expansionBackground.frame = self->_container.bounds;
270270
}
271-
else if (_fromLeft) {
272-
_expandedButton.frame = CGRectMake(_container.bounds.size.width - _expandedButton.bounds.size.width, 0, _expandedButton.bounds.size.width, _expandedButton.bounds.size.height);
273-
_expandedButton.autoresizingMask|= UIViewAutoresizingFlexibleLeftMargin;
274-
_expansionBackground.frame = [self expansionBackgroundRect:_expandedButton];
271+
else if (self->_fromLeft) {
272+
self->_expandedButton.frame = CGRectMake(self->_container.bounds.size.width - self->_expandedButton.bounds.size.width, 0, self->_expandedButton.bounds.size.width, self->_expandedButton.bounds.size.height);
273+
self->_expandedButton.autoresizingMask|= UIViewAutoresizingFlexibleLeftMargin;
274+
self->_expansionBackground.frame = [self expansionBackgroundRect:self->_expandedButton];
275275
}
276276
else {
277-
_expandedButton.frame = CGRectMake(0, 0, _expandedButton.bounds.size.width, _expandedButton.bounds.size.height);
278-
_expandedButton.autoresizingMask|= UIViewAutoresizingFlexibleRightMargin;
279-
_expansionBackground.frame = [self expansionBackgroundRect:_expandedButton];
277+
self->_expandedButton.frame = CGRectMake(0, 0, self->_expandedButton.bounds.size.width, self->_expandedButton.bounds.size.height);
278+
self->_expandedButton.autoresizingMask|= UIViewAutoresizingFlexibleRightMargin;
279+
self->_expansionBackground.frame = [self expansionBackgroundRect:self->_expandedButton];
280280
}
281281

282282
} completion:^(BOOL finished) {
@@ -303,14 +303,14 @@ -(void) endExpansionAnimated:(BOOL) animated
303303
}
304304
CGFloat duration = _fromLeft ? _cell.leftExpansion.animationDuration : _cell.rightExpansion.animationDuration;
305305
[UIView animateWithDuration: animated ? duration : 0.0 delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
306-
_container.frame = self.bounds;
307-
if (_expansionLayout == MGSwipeExpansionLayoutCenter) {
308-
_expandedButtonAnimated.frame = _expandedButtonBoundsCopy;
306+
self->_container.frame = self.bounds;
307+
if (self->_expansionLayout == MGSwipeExpansionLayoutCenter) {
308+
self->_expandedButtonAnimated.frame = self->_expandedButtonBoundsCopy;
309309
}
310310
[self resetButtons];
311-
_expansionBackgroundAnimated.frame = [self expansionBackgroundRect:_expandedButtonAnimated];
311+
self->_expansionBackgroundAnimated.frame = [self expansionBackgroundRect:self->_expandedButtonAnimated];
312312
} completion:^(BOOL finished) {
313-
[_expansionBackgroundAnimated removeFromSuperview];
313+
[self->_expansionBackgroundAnimated removeFromSuperview];
314314
}];
315315
}
316316
else if (_expansionBackground) {

0 commit comments

Comments
 (0)