2018-08-22から1日間の記事一覧
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…
English version below. https://hopita.hatenablog.com/entry/2018/08/22/225145 はじめに 選択されたCellをもとに戻す。よくやることですが、恥ずかしながら勘違いして覚えていたので備忘録。 解決方法 override func tableView(_ tableView: UITableView,…
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 …