What do you want to save?
Add Code snippet
New code examples in category Swift
-
Rubixphys12 2022-01-25 13:16:08
iOS: Delete ALL Core Data Swift
public func clearAllCoreData() { let entities = self.persistentContainer.managedObjectModel.entities entities.flatMap({ $0.name }).forEach(clearDeepObjectEntity) } private func clearDeepObjectEntity(_ entity: String) { let context = self.pers... Add solution -
A-312 2022-01-24 00:57:14
how to set the spacing of a collection view swift
// Do any additional setup after loading the view, typically from a nib. let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() layout.sectionInset = UIEdgeInsets(top: 20, left: 0, bottom: 10, right: 0) layout.ite... Add solution -
Awgiedawgie 2022-01-23 21:45:33
swift negative line spacing
var attrString = NSMutableAttributedString(string: labelText) var style = NSMutableParagraphStyle() let minMaxLineHeight = font.pointSize - font.ascender + font.capHeight let offset = NSNumber(value: Float(font.capHeight - font.ascender)) let range = NSRa... Add solution -
Best helpers
Meredithob
+5
Haejin Lee
+5
Terry claw
+5
Bryan Pettit
+5
Root
+5
Orgillion
+5
Barrie
+5
Victor Engel
+5
Muazam
+5
Rohan Wagle
+5
DanH
+5
Mujah_d
+5
Soks
+5
Bhavya PH
+5