Skip to content

Commit ae80c79

Browse files
author
Erik Malyak
committed
Added attributes for proper naming conventions in Swift 3 and Objective-C
1 parent 263b4c7 commit ae80c79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

EMPageViewController/EMPageViewController.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ open class EMPageViewController: UIViewController, UIScrollViewDelegate {
192192

193193
- important: If you are using a data source, make sure you set `dataSource` before calling `selectViewController:direction:animated:completion:`
194194

195-
- parameter selectViewController: The view controller to be selected.
195+
- parameter viewController: The view controller to be selected.
196196
- parameter direction: The direction of the navigation and animation, if applicable.
197197
- parameter completion: A block that's called after the transition is finished. The block parameter `transitionSuccessful` is `true` if the transition to the selected view controller was completed successfully.
198198
*/
@@ -219,6 +219,7 @@ open class EMPageViewController: UIViewController, UIScrollViewDelegate {
219219
- parameter animated: A Boolean whether or not to animate the transition
220220
- parameter completion: A block that's called after the transition is finished. The block parameter `transitionSuccessful` is `true` if the transition to the selected view controller was completed successfully. If `false`, the transition returned to the view controller it started from.
221221
*/
222+
@objc(scrollForwardAnimated:completion:)
222223
open func scrollForward(animated: Bool, completion: ((_ transitionSuccessful: Bool) -> Void)?) {
223224

224225
if (self.afterViewController != nil) {
@@ -250,6 +251,7 @@ open class EMPageViewController: UIViewController, UIScrollViewDelegate {
250251
- parameter animated: A Boolean whether or not to animate the transition
251252
- parameter completion: A block that's called after the transition is finished. The block parameter `transitionSuccessful` is `true` if the transition to the selected view controller was completed successfully. If `false`, the transition returned to the view controller it started from.
252253
*/
254+
@objc(scrollReverseAnimated:completion:)
253255
open func scrollReverse(animated: Bool, completion: ((_ transitionSuccessful: Bool) -> Void)?) {
254256
if (self.beforeViewController != nil) {
255257

@@ -265,12 +267,12 @@ open class EMPageViewController: UIViewController, UIScrollViewDelegate {
265267
}
266268

267269

268-
@available(*, unavailable, renamed: "scrollForward(animated:completion:)")
270+
@nonobjc @available(*, unavailable, renamed: "scrollForward(animated:completion:)")
269271
open func scrollForwardAnimated(_ animated: Bool, completion: ((_ transitionSuccessful: Bool) -> Void)?) {
270272
self.scrollForward(animated: animated, completion: completion)
271273
}
272274

273-
@available(*, unavailable, renamed: "scrollReverse(animated:completion:)")
275+
@nonobjc @available(*, unavailable, renamed: "scrollReverse(animated:completion:)")
274276
open func scrollReverseAnimated(_ animated: Bool, completion: ((_ transitionSuccessful: Bool) -> Void)?) {
275277
self.scrollReverse(animated: animated, completion: completion)
276278
}

0 commit comments

Comments
 (0)