English
Introduction This article shows how to use "CaseIterable" protocol which introduced in Swift4.2. This protocol can provede all values of enum type. So, I do not need to implement such a property any more. Before Swift4.2 In Swift4.1 or ear…
Introduction This article shows how to solve the build error related with "CommonCrypto" on Xcode10. After updating the Xcode to version10, I faced on the error messages as below. The CommonCrypto was imported by cocoapods in my case. Rede…
Introduction This article shows how to connect to localhost on Mac from iPhone and some tips. Conditions Mac and iPhone is on the same network. How to connect it Set up the localhost server on a mac Confirm the access to the "localhost:{Po…
Introduction This article shows how to change a language settings while debugging on the devices. This method is useful for confirming the localized String or text including line breaks. It won't need to change the language from settings a…
Introduction When I tried to transition some pages so rapidly. The Xcode shows an error message as below. Unbalanced calls to begin/end appearance transitions for The code is below. class MyPageViewController: UIPageViewController { var ma…
Introduction It was difficult and complexity to set the autolayout programatically when the AutoLyaout announced in iOS NSLayoutConstraint(item: button, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leadingMargin, …
Solution let board = UIPasteboard.general board.string = "ABC"
Introdution This article show the basically usage of Decodable Protocol. What's the Decodable The Decodable give us an easy way to convert the JSON Data type to Class or Struct. Thanks for the Decoable protocol, developer could access each…
Introduction This article shows how to wait for an async procedure like API Request or some closure. Solution It is easy to wait an async procedure using "expectation" Sample Code let request = SomeRequest() let expect = expectation(descri…
Introduction This article shows how to solve the error message about “Module was not compiled for testing” on XCTest code. The module was installed by Carthage. Background When I try to do my test code on the XCTest, sometimes I would like…
Introduction This article shows how to get an index in for each sentence. Solution Using enumarated method. You can get the index of array for (index, value) in someArray.enumarated() { // do something }
Introduction This article shows how to edit a view in debug mode by LLDB Console. Preparation First of all, Build an app on a simulator or device and open the [Debug View Hierarchy] In this article, I'll show you how to change an informati…
Introduction This article shows hot to detect an entering background and activating from background in UIViewController. Solution As you know, UIViewController doesn't have a delegate which is called when it will go background and come bac…
Introduction This article shows how to solve the black screen when a modal view was dismissed with custom animation. When I tried to set an present and modal animation when a modal view was appeared and disappeared. Though the present anim…
Introduction This article shows how to scale an image in UIButton. When UIButton will be a large scale or small scale by Autolayout engine, an image it was contained in the UIButton is not correspond to the scale normally. This article wil…
Intoduction This article shows how to set a monospace font for digits. A monospace font has same width in each character. Sometimes, a font which isn't monospace make the design baddly. Solution To get the monospace font for digits, Apple …
Introduction This article show you that how to dismiss the keyboard when user tap a return key on UITextField of iOS. In fact, this way shows on the iOS SDK document. I've never knew it. Solution Adapt the UITextFieldDelegate on your ViewC…
Introdution UITableView is one of the most popular UI system in iOS developer. But, sometimes this UI system make us annoying. In this time, when I try to delete the UITableViewCell from swipe or delete button, it would be crashed. So, thi…
Introduction This article explains its difficult to animate an UIView by themselves when it appeared. Conclusion There two solution for the problem. • Call some animation start method by UIViewController • Observe the didBecomeActive event…
Intoroduction This are article shows how to detect the instance is inheritance of some class or not. Solution if someInstane is SomeClass { // The Instance is inheritance of some class. } else { // Instance is not inheritance of some class.…
Introduction This article shows how to detect an user interaction while animating on UIView or UIbutton or etc. Solution Set the ".allowUserIntercation" properties in option at UIView.animate method. UIView.animate(withDuration: 1.0, delay…
Introduction This article shows how to deselect an cell when user tapped it. Solution It's a easy way to do it. override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { //Change the selected background view …
Introduction This article shows how to rotate360 degrees for UIView. First I thought of using UiView.animate method and AffineTransform the UIView. It was figured out that if I set a transform property as below view.transform = CGAffineTra…
Sorry for my poor English skill. Introduction This article shows how to solve the problem that UIView transform doesn't scale correctly while transition animation. Transition animation make an app interactively. But, sometimes it meka deve…