Tuesday, September 27, 2022
HomeiOS Developmentios - Can I declare a operate inside a category with out...

ios – Can I declare a operate inside a category with out physique in Swift?


So I used to be referring to the UIKit.UITableView file and I seen that every one the capabilities inside UITableView class are written with out their physique. I attempted to do the identical in my undertaking however Xcode would not let me accomplish that. Can somebody clarify how was that potential within the supply file?

Under is a pattern snippet from there.

open func insertRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation)

open func deleteRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation)

@out there(iOS 5.0, *)
open func moveRow(at indexPath: IndexPath, to newIndexPath: IndexPath)

@out there(iOS 3.0, *)
open func reloadRows(at indexPaths: [IndexPath], with animation: UITableView.RowAnimation)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments