Skip to content

Commit 691eac4

Browse files
crleonaKeqiu Hu
authored andcommitted
Refine Swift names (#61)
1 parent 2ddb832 commit 691eac4

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

LayoutTest.podspec

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'LayoutTest'
3-
spec.version = '6.0.0'
3+
spec.version = '6.0.1'
44
spec.license = { :type => 'Apache License, Version 2.0' }
55
spec.homepage = 'https://linkedin.github.io/LayoutTest-iOS'
66
spec.authors = 'LinkedIn'
@@ -16,18 +16,18 @@ Pod::Spec.new do |spec|
1616

1717
spec.subspec 'TestCase' do |sp|
1818
sp.source_files = 'LayoutTest/TestCase'
19-
sp.dependency 'LayoutTestBase/Autolayout', '6.0.0'
20-
sp.dependency 'LayoutTestBase/Catalog', '6.0.0'
21-
sp.dependency 'LayoutTestBase/Config', '6.0.0'
22-
sp.dependency 'LayoutTestBase/Core', '6.0.0'
23-
sp.dependency 'LayoutTestBase/UIViewHelpers', '6.0.0'
19+
sp.dependency 'LayoutTestBase/Autolayout', '6.0.1'
20+
sp.dependency 'LayoutTestBase/Catalog', '6.0.1'
21+
sp.dependency 'LayoutTestBase/Config', '6.0.1'
22+
sp.dependency 'LayoutTestBase/Core', '6.0.1'
23+
sp.dependency 'LayoutTestBase/UIViewHelpers', '6.0.1'
2424
sp.framework = 'XCTest'
2525
end
2626

2727
spec.subspec 'SwiftSubspec' do |sp|
2828
sp.source_files = 'LayoutTest/Swift', 'LayoutTest/LayoutTest.h'
2929
sp.dependency 'LayoutTest/TestCase'
30-
sp.dependency 'LayoutTestBase/Swift', '6.0.0'
30+
sp.dependency 'LayoutTestBase/Swift', '6.0.1'
3131
end
3232
end
3333

LayoutTestBase.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'LayoutTestBase'
3-
spec.version = '6.0.0'
3+
spec.version = '6.0.1'
44
spec.license = { :type => 'Apache License, Version 2.0' }
55
spec.homepage = 'https://linkedin.github.io/LayoutTest-iOS'
66
spec.authors = 'LinkedIn'

LayoutTestBase/UIViewHelpers/UIView+LYTFrameComparison.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
2323
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
2424
\returns True if the view is laid out before another view.
2525
*/
26-
- (BOOL)lyt_before:(UIView *)otherView;
26+
- (BOOL)lyt_before:(UIView *)otherView NS_SWIFT_NAME(lyt_before(_:));
2727

2828
/**
2929
Version of lyt_before that takes a fromCenter param. If fromCenter is YES, the comparison starts from the center of the view rather than the
@@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
3434
\param fromCenter If YES, allow an overlap up to the center of otherView. If NO, behavior is the same as without the param
3535
\returns True if the view is laid out before another view, allowing for an overlap up to the center if fromCenter is YES.
3636
*/
37-
- (BOOL)lyt_before:(UIView *)otherView fromCenter:(BOOL)fromCenter;
37+
- (BOOL)lyt_before:(UIView *)otherView fromCenter:(BOOL)fromCenter NS_SWIFT_NAME(lyt_before(_:fromCenter:));
3838

3939
/**
4040
Returns whether a view is after another view on the horizontal axis. It returns false if they are overlapping in any way.
@@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
4646
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
4747
\returns True if the view is laid out after another view.
4848
*/
49-
- (BOOL)lyt_after:(UIView *)otherView;
49+
- (BOOL)lyt_after:(UIView *)otherView NS_SWIFT_NAME(lyt_after(_:));
5050

5151
/**
5252
Version of lyt_after that takes a fromCenter param. If fromCenter is YES, the comparison starts from the center of the view rather than the
@@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
5757
\param fromCenter If YES, allow an overlap up to the center of otherView. If NO, behavior is the same as without the param
5858
\returns True if the view is laid out before another view, allowing for an overlap up to the center if fromCenter is YES.
5959
*/
60-
- (BOOL)lyt_after:(UIView *)otherView fromCenter:(BOOL)fromCenter;
60+
- (BOOL)lyt_after:(UIView *)otherView fromCenter:(BOOL)fromCenter NS_SWIFT_NAME(lyt_after(_:fromCenter:));
6161

6262
/**
6363
Returns whether a view is above another view on the vertical axis. It returns false if they are overlapping in any way.
@@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN
6767
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
6868
\returns True if the view is laid out above another view.
6969
*/
70-
- (BOOL)lyt_above:(UIView *)otherView;
70+
- (BOOL)lyt_above:(UIView *)otherView NS_SWIFT_NAME(lyt_above(_:));
7171

7272
/**
7373
Returns whether a view is below another view on the vertical axis. It returns false if they are overlapping in any way.
@@ -77,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN
7777
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
7878
\returns True if the view is laid out below another view.
7979
*/
80-
- (BOOL)lyt_below:(UIView *)otherView;
80+
- (BOOL)lyt_below:(UIView *)otherView NS_SWIFT_NAME(lyt_below(_:));
8181

8282
/**
8383
Returns whether the start of a view is aligned with another view on the horizontal axis. It allows views to overlap.
@@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN
8989
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
9090
\returns True if the view is start aligned with another view.
9191
*/
92-
- (BOOL)lyt_leadingAligned:(UIView *)otherView;
92+
- (BOOL)lyt_leadingAligned:(UIView *)otherView NS_SWIFT_NAME(lyt_leadingAligned(_:));
9393

9494
/**
9595
Returns whether the end of a view is aligned with another view on the horizontal axis. It allows views to overlap.
@@ -101,7 +101,7 @@ NS_ASSUME_NONNULL_BEGIN
101101
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
102102
\returns True if the view is end aligned with another view.
103103
*/
104-
- (BOOL)lyt_trailingAligned:(UIView *)otherView;
104+
- (BOOL)lyt_trailingAligned:(UIView *)otherView NS_SWIFT_NAME(lyt_trailingAligned(_:));
105105

106106
/**
107107
Returns whether the top of a view is aligned with another view on the vertical axis. It allows views to overlap.
@@ -111,7 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
111111
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
112112
\returns True if the view is top aligned with another view.
113113
*/
114-
- (BOOL)lyt_topAligned:(UIView *)otherView;
114+
- (BOOL)lyt_topAligned:(UIView *)otherView NS_SWIFT_NAME(lyt_topAligned(_:));
115115

116116
/**
117117
Returns whether the bottom of a view is aligned with another view on the vertical axis. It allows views to overlap.
@@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN
121121
\param otherView The view you want to compare to. It does not need to have the same superview, but MUST share some ancestor view.
122122
\returns True if the view is bottom aligned with another view.
123123
*/
124-
- (BOOL)lyt_bottomAligned:(UIView *)otherView;
124+
- (BOOL)lyt_bottomAligned:(UIView *)otherView NS_SWIFT_NAME(lyt_bottomAligned(_:));
125125

126126
@end
127127

LayoutTestBase/UIViewHelpers/UIView+LYTTestHelpers.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
2323
cell.contentView because it sometimes fails for the contentView in it's
2424
superview due to some UIKit weirdness.
2525
*/
26-
- (void)lyt_assertViewWithinSuperViewBounds:(void(^)(NSString *error, UIView *view))errorBlock;
26+
- (void)lyt_assertViewWithinSuperViewBounds:(void(^)(NSString *error, UIView *view))errorBlock NS_SWIFT_NAME(lyt_assertViewWithinSuperViewBounds(_:));
2727

2828
/**
2929
Useful helper for writing tests. Ensures recursively that all the subviews of the view are within the bounds of their superviews. If this condition breaks,
@@ -35,14 +35,14 @@ NS_ASSUME_NONNULL_BEGIN
3535
on cell.contentView because it sometimes fails for the contentView in it's
3636
superview due to some UIKit weirdness.
3737
*/
38-
- (void)lyt_recursivelyAssertViewWithinSuperViewBounds:(NS_NOESCAPE void(^)(NSString *error, UIView *view))errorBlock;
38+
- (void)lyt_recursivelyAssertViewWithinSuperViewBounds:(NS_NOESCAPE void(^)(NSString *error, UIView *view))errorBlock NS_SWIFT_NAME(lyt_recursivelyAssertViewWithinSuperViewBounds(_:));
3939

4040
/**
4141
Useful helper for writing tests. Ensures that none of the subviews of this view overlap.
4242
4343
When comparing CGFloats, (x > y) if and only if (x > y + epsilon). This epsilon value is defined in LYTConfig.
4444
*/
45-
- (void)lyt_assertNoSubviewsOverlap:(NS_NOESCAPE void(^)(NSString *error, UIView *view1, UIView *view2))errorBlock;
45+
- (void)lyt_assertNoSubviewsOverlap:(NS_NOESCAPE void(^)(NSString *error, UIView *view1, UIView *view2))errorBlock NS_SWIFT_NAME(lyt_assertNoSubviewsOverlap(_:));
4646

4747
/**
4848
Useful helper for writing tests. Ensures that none of the subviews of this view overlap. It calls this recursively on subviews, but does not test all
@@ -51,19 +51,19 @@ NS_ASSUME_NONNULL_BEGIN
5151
5252
When comparing CGFloats, (x > y) if and only if (x > y + epsilon). This epsilon value is defined in LYTConfig.
5353
*/
54-
- (void)lyt_recursivelyAssertNoSubviewsOverlap:(NS_NOESCAPE void(^)(NSString *error, UIView *view1, UIView *view2))errorBlock;
54+
- (void)lyt_recursivelyAssertNoSubviewsOverlap:(NS_NOESCAPE void(^)(NSString *error, UIView *view1, UIView *view2))errorBlock NS_SWIFT_NAME(lyt_recursivelyAssertNoSubviewsOverlap(_:));
5555

5656
/**
5757
This method first returns the current view, then traverses the view hierarchy.
5858
*/
59-
- (void)lyt_recursivelyTraverseViewHierarchy:(NS_NOESCAPE void(^)(UIView *subview))subviewBlock;
59+
- (void)lyt_recursivelyTraverseViewHierarchy:(NS_NOESCAPE void(^)(UIView *subview))subviewBlock NS_SWIFT_NAME(lyt_recursivelyTraverseViewHierarchy(_:));
6060

6161
/**
6262
This method first returns the current view, then traverses the view hierarchy.
6363
6464
It also provides a stop parameter. If you set this to true, then the method will stop recursing on this branch only.
6565
*/
66-
- (void)lyt_recursivelyTraverseViewHierarchyWithStop:(NS_NOESCAPE void(^)(UIView *subview, BOOL *stopBranch))subviewBlock;
66+
- (void)lyt_recursivelyTraverseViewHierarchyWithStop:(NS_NOESCAPE void(^)(UIView *subview, BOOL *stopBranch))subviewBlock NS_SWIFT_NAME(lyt_recursivelyTraverseViewHierarchyWithStop(_:));
6767

6868
@end
6969

0 commit comments

Comments
 (0)