This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by http://www.gitignore.io | |
### Xcode ### | |
build | |
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
!*.xcworkspace/contents.xcworkspacedata | |
### Objective-C ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RealmSwift | |
import Realm | |
protocol CascadeDeleting: class { | |
func delete<Entity>(_ list: List<Entity>, cascading: Bool) | |
func delete<Entity>(_ results: Results<Entity>, cascading: Bool) | |
func delete<Entity: Object>(_ entity: Entity, cascading: Bool) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Given a source image, create icons in all sizes needed for an iOS app icon. | |
# See <https://developer.apple.com/library/ios/qa/qa1686/_index.html> for details. | |
# | |
# First (required) argument is path to source file. | |
# | |
# Second (optional) argument is the prefix to be used for the output files. | |
# If not specified, defaults to "Icon-". | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIImage { | |
func RBSquareImageTo(size: CGSize) -> UIImage? { | |
return self.RBSquareImage()?.RBResizeImage(size) | |
} | |
func RBSquareImage() -> UIImage? { | |
let originalWidth = self.size.width | |
let originalHeight = self.size.height |