gweijie01@gmail.com

Latest from gweijie01@gmail.com

  • How To Use List Of Objects With User Defaults iOS & Swift 4

    How To Use List Of Objects With User Defaults iOS & Swift 4

    Ever wanted to store a list of objects into user defaults for reference later? Lets check out the below code to do just that. // to retrieve arrays from user defaults UserDefaults.standard.array(forKey: “yourArrayKey”) // to store arrays of objects into user defaults UserDefaults.standard.set(arrayToStore, forKey: “yourArrayKey”) // to delete the object from your user defaults UserDefaults.standard.removeObject(forKey:
    Read More…

  • How To Display An Alert In iOS & Swift 5

    How To Display An Alert In iOS & Swift 5

    In iOS, there will be times where you will want to give the user some feedback depending on the situation. It could be because of a success or a failure whether it be during object creation or authentication. Below is a code snippet to create an AlertViewController and then present it. We can add actions
    Read More…




  • How to turn on the flashlight with iOS Swift

    How to turn on the flashlight with iOS Swift

    iOS gives us access to the flashlight if there is currently one available on the phone. Technically, its called a torch but whatever lol… Here is a code snippet on how to turn on the torch. import AVFoundation func toggleTorch(on: Bool) { guard let device = AVCaptureDevice.default(for: AVMediaType.video) else { return } if device.hasTorch {
    Read More…

  • Introduction to Core ML

    Introduction to Core ML

    In the introduction to the new framework at WWDC 2017, the speakers made some interesting revelations. Check out my notes below: CoreML is a lower level library that offers a bunch of prebuilt models such as SVMs, Neural Networks, Random Forrests etc… If you don’t want to work at the model level, there are 2
    Read More…

  • WWDC 2017 iOS Notes

    WWDC 2017 iOS Notes

    WWDC 2017 happened last week and there is a huge amount of videos covering new iOS technologies. I’ll try to summarize the videos I watch in this post. Introduction to CoreML

  • Pycon 2017 Notes

    Pycon 2017 Notes

    Pycon 2017 just finished recently in Portland last week and you can check out the videos here. As I go through these videos (there is a lot of them), I’ll be taking notes on what I find useful and post them here.

  • Hello world! EHackz!

    Hello world! EHackz!

    EHackz.com is a new tutorial/coding website for hackers. Subjects that will be covered: Python iOS/Swift Android Javascript Machine Learning Frameworks Tutorials I hope you follow along with this journey, and I hope you enjoy the ride. 🙂