Skip to content

Instantly share code, notes, and snippets.

View AndreyPanov's full-sized avatar
🤚

Andrei Panov AndreyPanov

🤚
View GitHub Profile
extension UITableView {
func animatedInsert(indexPaths paths: [NSIndexPath], withRowAnimation animation: UITableViewRowAnimation = .Automatic) {
guard paths.isEmpty == false else { return }
beginUpdates()
insertRowsAtIndexPaths(paths, withRowAnimation: animation)
endUpdates()
}
func animatedlReload(indexPaths paths: [NSIndexPath], withRowAnimation animation: UITableViewRowAnimation = .Automatic) {
@AndreyPanov
AndreyPanov / UIImageExtension.swift
Last active May 24, 2016 07:50
Using unwrap images in project
protocol AssetLoadable {
var rawValue: String { get }
func imageNamed() -> String
}
extension AssetLoadable {
func imageNamed() -> String {
return rawValue
}