Refactor a Mega View Controller - A Live Coding!
Andy Matuschak gave a good talk on refactoring a mega controller.
Figuring out software, one rabbit hole at a time.
Andy Matuschak gave a good talk on refactoring a mega controller.
tldr: Check out wwdc-dl, the github project with the Swift scripts
This post covers more common tasks when writing Swift scripts, following the post on an introduction to Swift scripting.
Using web view is not new. We had UIWebView for many years.
Erica Sadun posted a Swift rewrite challenge, and the chosen function is to scale and crop an image.
In the last post we have an introduction with using Instruments to finding memory leak.
Often, developers do not put much effort into finding memory leak. While technology like ARC and Swift has helped to prevent us from creating memory leak, it is still unavoidable.
Recently I migrated blog.just2us.com from a self hosted wordpress to Jekyll on Github Pages.
I had a Blogger site that was recently migrated to the fabulous Jekyll (which this website is running on too!).
While converting a HTML string to a NSAttributedString, I discovered a perculiar thing about it’s unicode encoding format.
Getting Started
While running a node app with Docker, there is an error 137:
If you use auto layout and support iOS 8, then you are in luck.
iOS 7 introduces Dynamic Type, a way for users to change their preferred text size from iPhone/iPad global Settings.
When using a library that is built with static framework (vs dynamic) and integrating using Cocoapods, you could have linker error when you use use_frameworks! and Swift.
This is a Swift code snippet for making the tab bar have a sliding animation when selected.
It is very common to have Core Data crashing, especially if you are using multiple contexts in multi-threaded environment.
UPDATED for Swift 4.2. And for UIScene, refer to this.
There is a common pitfall with using Core Graphics API to draw.
There are many methods to creating your user interface - storyboard, xib, pure code, with custom cell, using view tags..
App Link is, technically, not a link, but metadata (eg. og:title and og:url) on a webpage.
I have covered a few posts on using UICollectionView.
We all know a cell is tapped wehn UITableViewDelegate method - tableView:didSelectRowAtIndexPath: - is called.
ErrorType is a big thing is Swift, changing the way how errors are handled.
I have previously provided 2 posts about UIPageViewController, but that’s not enough.
A good example is a UILabel that looks like the following below the Facebook button.
UIActivityViewController was introduced in iOS 6 for apps to handle data (text, url, image, etc) in another app.
A previous post on using fastlane’s snapshot for automating screenshots capture provided some good tips.
I encountered a weird situation whereby the record button (at the bottom left of Xcode), is disabled.