Wednesday, September 21, 2016

Remove unwanted message from Xcode 8 console logs

1- From xCode menu open: Product > Scheme > Edit Scheme
2- On your Environment Variables set OS_ACTIVITY_MODE = disable

Note that the value is disable NOT false

Tuesday, September 20, 2016

Corner Radius in Swift 2.3 and above

Since Swift 2.3 onwards, it is now required to define the corner radius of your views after your view has loaded, hence, move the corner radius value assignment to viewDidLayoutSubviews() else your view will just not be visible from your app, even though it's viewable in the story board or the view hierarchy.

As for views in a table view cell, I've seen people getting their views rounded by assigning cornerRadius inside layoutSubviews(), but I didn't have any success with that, the following worked for me even though I personally don't like it.


Add self.layoutIfNeeded() right after super.awakeFromNib() to force layout