Thursday, April 11, 2019

Problem UICollectionViewController When Trying to Use bringSubview Swift 4

Hi guys, I found unique issue when trying to use bringSubview in UICollectionViewController. The method doesn't work if you try like this


self.view!.addSubview(something)
self.view!.bringSubview(toFront: something)

So to do trick you need to use superview!.


self.view!.superview!.addSubview(something)
self.view!.superview!.bringSubview(toFront: something)

reference : https://stackoverflow.com/questions/26850501/swift-bringsubviewtofront-not-working

Saturday, March 9, 2019

Change status bar text to white iOS Swift 4.2 Xcode 10.0

Hello back guys, I'll show you guys how to change status bar text without coding. Just follow this screenshoot that I give.





Source code in Info.plist

Thursday, February 14, 2019

Trick to Avoid Force Close Because of JSON Null Swift 4

Hi guys today I'm gonna share to you my extension to handle JSON null. You can change return default. So your app will never be force closed because of JSON null. So this is the code.

Sunday, February 10, 2019

Extension Rotating Image Smoothly with Swift 4

Do you ever want to do animation thing like rotating image continuously ? Today I want to give you a good way to do it. I make this a extension so it's easily to maintain :D. I found this trick on stackoverflow and implement it using swift.


Saturday, February 2, 2019

Get Height Keyboard iOS Swift 4

I have a problem when trying to use IQKeyboardManager. When keyboard show up, the navbar sometimes will break the top and give some white space. So finally i turn off IQKeyboardManager and trying to implement keyboard show up by self. So the point is to get height keyboard and raise the textbox above keyboard. This is the example of I've done.