Category "swift3"

How to use Button SwiftUI correctly?

There is a code that, by pressing the "Sign Up" button at the bottom of the screen, should open another window. But for some reason, when you click on the butto

How to check if IndexPath is valid?

Prior to swift 3, i used to use for example: let path = self.tableView.indexPathForSelectedRow if (path != NSNotFound) { //do something } But now, since i u

Presenting View controller disappears after animation

I've a TabBarController in which presents a view controller with custom animations with UIViewControllerAnimatedTransitioning; The animations run normally with

Autoresizing issue in Xcode 8

=== EDIT ======== This issue is now solved in Xcode 8.1. I have checked. ================ I don't know auto-layout properly. So, I am using autoresizing opti

Unique Identifier for scheduling notifications, Swift 3 iOS 10

I am scheduling notifications with Unique Identifiers so I don't have to make a new String for each notification. This all works well for scheduling but the pro

White line below UIRefreshControl when pulled.. tableView

I am implementing a very basic Refresh control... var refreshControl = UIRefreshControl() refreshControl.addTarget(self, action: Selector(("refresh:"))

Type of expression is ambiguous without more context Swift

I am getting a 'Type of expression is ambiguous without more context ' on this part of code from a project I am trying to upgrade to latest Swift version. I can

Listing all class attributes swift 3

I'm trying to print all the values from an object that inherits from a class, here is my example: I create the class: class Pokemon { var name: String? va

Get Image from CALayer or NSView (swift 3)

I was looking for a way to render a CALayer or NSView and get NSImage back. I have a custom class, which is a subclass of NSView. At the beginning I simply make

How to set a custom store URL for NSPersistentContainer

How can I set a custom store.sqlite URL to NSPersistentContainer? I have found an ugly way, subclassing NSPersistentContainer: final public class PersistentCo