How do we pass data from one controller to another, there are many posts on this but this is the easiest way In the second view controller just add the variable, and you can access the data declare the variable in the second view, and you can access the data.
Monthly Archives: February 2019
Dictionary Objects
Had a little bit of fun today, for some reason accessing a dictionary object by substring did not return the correct object. So for future reference ALWAYS use let photosarray = dictionary.value(forKey: “photos”) Scratched my head about this for a few hours today. Accessing by “forKey” is the correct reference per the Apple documentation
Autolayout in custom cell ignored
Fun little problem here…. Autolayout with the constraints enabled was not working. Solution Auto-layout was ignored because both the prototype cell AND the UIView of the cell had been given the custom cell class in IB. Setting the contentView view to nothing solved the problem.
Adding Custom Cells to a tableView
Customize the cell in our own style – instead of using default table view style, We need a new cell type, so we can add multiple images, and or text in different places. Drag and drop Table View Cell from utility area on UITableView. Now add an image view and a label from utility […]
Fun little Generic Linked List class
I use lists a lot
Swift Libraries.. via Cocoapods
Lots of different abilities available via cocoapods.. To install to your project, open a terminal window type “cd ” grab the project name from xcode, paste it next to the “cd ” press enter You are now in the project directory type “sudo gem install cocoapods” type your password Cocoapods should install for this project […]
App Background color
Can’t find the Swift background color you are looking for? I found this site, it generates the swift code any type of background color you need for your site. https://www.ralfebert.de/ios-examples/uikit/swift-uicolor-picker/
Welcome
Hello all and welcome to my new blog. Software engineer 17 years experience. I am setting up this blog for myself and others to read while I learn the Swift Programming language. Rather than take notes, I decided to write all my discoveries in a blog. I ask a lot of questions and find a […]