Tag: tips & tricks

  • Making iOS Swift App Without Storyboard, Just Programmatically!

    Making iOS Swift App Without Storyboard, Just Programmatically!

    Storyboard is a good thing but has some side unwanted effect. You can find many discussion about it. Personally I don’t like it so much especially when I make an application without default navigation system it is useless, slow and makes me tired. I prefer creating my UIViews separately and link them to their UIViewController’s…

  • iOS Swift Initialising XIB And Bind To The Controller Without Storyboard

    iOS Swift Initialising XIB And Bind To The Controller Without Storyboard

    It is very useful to able to initialise  xib files independently from storyboard. Here is what to do with a line of code: //Calling the initializer in the ViewController convenience override init() { // ViewName is by convenience same name. // I use like: BlahV.xib BlahVC.swift self.init(nibName: “BlahV.xib”, bundle: nil) //initializing the view Controller form specified…

  • Git Submodule Adding To Existing Git Project

    Git Submodule Adding To Existing Git Project

    Tidy way of adding 3rd part frameworks in your project is; First, go into project folder clon the 3rd part frameworks in this with git command below. It will create a Frameworks folder and sub folder for the desired repository. #example below for adding SwiftyJSON git submodule add https://github.com/SwiftyJSON/SwiftyJSON.git Frameworks/SwiftyJSON #example below for adding Alamofire git…

  • Playing YouTube Videos In iOS Device

      Playing a YouTube video in the app is very easy with UIWebView Here is a snippet // YouTube video  @IBOutlet weak var webView: UIWebView!     // MARK: – Embed Video Player // id is like: xjr89789234 (grab this from youtube url)     func loadYoutube(_ videoID:String) {         guard    …

  • Xcode Auto Incremental Version And Build Number

    It’s very useful to track version changes during the development and even after release. It allows us to detect the problems belongs to build and/or version. Doing this manually is not easy and boring. I was looking for a solution to make it  automatically. This github resource helped me lot. I don’t know if he’s…

  • iOS Swift Detecting Device Rotation

    How to detect device rotation event in iOS Swift 3: Detecting device rotation is not a big secret but doing this in a clean way is important. I mean adding and removing the observers in correct time/place. Many developer are adding  observers without removing with exit. This leads memory leaks and performance issues.   override func…

  • UIView With Rounded Background Designable In Storyboard

    UIView With Rounded Background Designable In Storyboard

    This class can be inherited as a base class for having any time a framed background behind the UIView. It is also designable in the Storyboard. I’ve used it in UITableViewCell for my customCell view.

  • Swift Creating Vertical UISlider Programmatically

    Swift Creating Vertical UISlider Programmatically

    This code creating UISlider and turn 90 degrees  anticlockwise with -M_PI_2 in another context for another UIView we could use the same code with M_PI_2  for turning 90 degrees clockwise. I found this easy and useful, worth note.

  • MAMP Conflict With Builtin macOS PHP [Solved]

    After trying all for stopping  builtin Apache on my computer (actually OS X 10.11.6 El Capitan) It was still keep saying “port 80 was using by another application” when I start the MAMP (MAMP Pro 3.5)

  • Canon EOS 1100D Continuous Power With LP-E10 Battery Hack

    Canon EOS 1100D Continuous Power With LP-E10 Battery Hack

    This video is about using is the Canon EOS 1100D (or Canon KISS X50 Canon REBEL T3) with continuous AC power supply with home made battery hack. The battery we’re going to open and convert to permanent AC power is LP-E10.

  • Arduino Talkie Library Convertor Patch

    Arduino can talk without any complicated circuit or extra add thanks to this useful Talkie Library. Library is working pretty well but adding/converting custom wav files needs some time and knowledge. Discussion is on github. I’ve just involved to this conversation issue with my little script to complete a step of complicated conversation steps. Steps:…

  • Using Real 1 Bit Boolean Variable For Arduino Memory Efficiency

    Using Real 1 Bit Boolean Variable For Arduino Memory Efficiency

    We love Arduino we want to make some fancy project  but in this beautiful playground we have some limitations.  32K Programming memory is quite enough but 2K SRAM is becoming insufficient  when we use  lot of variable, especially if we don’t use the variables in efficient way. For example; if the variable will have a value between 0 and 255 ve use…