Coding Explorer Blog

Exploring how to code for iOS in Swift and Objective-C

  • Home
  • Apps
  • About
  • Contact

Segue between Swift View Controllers

Xcode 11.6 Swift 5.2.4

Last updated on August 12, 2020

So, last time we learned how to make a simple Hello World app on a single view controller.  As fancy as it was, you probably want more than one screen in your app, right?

Perhaps you want a way to segue into the next screen?

That’s what we’re going to go over today, as well as one of the simple ways to share data between view controllers.
[Read more…]

Filed Under: Tutorial Tagged With: Access Controls, optionals, properties, Swift

Access Control in Swift

Xcode 11.6 Swift 5.2.4

Last updated on August 10, 2020

The access control in Swift is much more like the access control I am accustomed to in other languages like C# or Java, and I am quite thankful for that.  I’m not saying there is anything wrong with Objective-C’s way of doing it, while it was different, I did like having the private properties in the interface block of the implementation (.m) file, and the public properties and methods in the header (.h) file.  It made it easy to know exactly where to look.

Nonetheless, access control is here in Swift, so here we go.  You can set access control to many things in Swift, particularly properties and methods, but you can even set it to types, initializers, subscripts, or protocols.  Swift currently has three levels of access control:

  • Public
  • Internal
  • Fileprivate
  • Private

[Read more…]

Filed Under: Swift Tagged With: Access Controls

Subscribe to the Coding Explorer Newsletter

* indicates required

Follow Us

Facebooktwitterrss

Recent Posts

  • Error Handling in Swift
  • Creating and Modifying a URL in your Swift App
  • Watch Connectivity in Swift — Application Context
  • watchOS Hello World App in Swift
  • API Availability Checking in Swift

Categories

  • Class Reference
  • General
  • Interface Builder
  • My Apps
  • Objective-C
  • Swift
  • Syntax
  • Tutorial
  • Uncategorized

Archives

  • May 2016
  • March 2016
  • February 2016
  • December 2015
  • July 2015
  • June 2015
  • April 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • January 2014
  • November 2013
  • September 2013
  • August 2013
  • July 2013
  • Terms Of Use
  • Privacy Policy
  • Affiliate Disclaimer

Subscribe to the Coding Explorer Newsletter

* indicates required

Copyright © 2025 Wayne Media LLC · Powered by Genesis Framework · WordPress