페이지

2018년 8월 26일 일요일

Awake() not called when inactive gameobject

if a prefab is inactive, the prefab Awake() not called after instantiated.

 set gameobject active after instantiating it or set prefab active.

 but you can call your own method in inactive gameobject.
 Inactive Gameobject means that there is nothing in unity scene world. Unity API not called. Awake(), Start(), Update(), OnCollision() and so on...

2017년 11월 3일 금요일

Dynamically Sized Table View Header or Footer Using Auto Layout

override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()
    // Dynamic sizing for the header view
    if let headerView = tableView.tableHeaderView {
        let height = headerView.systemLayoutSizeFittingSize(UILayoutFittingCompressedSize).height
        var headerFrame = headerView.frame

        // If we don't have this check, viewDidLayoutSubviews() will get
        // repeatedly, causing the app to hang.

        if height != headerFrame.size.height {
            headerFrame.size.height = height
            headerView.frame = headerFrame
            tableView.tableHeaderView = headerView
        }
    }
}


http://collindonnell.com/2015/09/29/dynamically-sized-table-view-header-or-footer-using-auto-layout/

2017년 10월 22일 일요일

notice: distributing ad hoc ipa

Building adhoc ipa file, You must check "Manually manage signing".
and you just choose its adhoc app provisioning file and certificate

(x) Automatically manage signing
(o) Manually manage signing


2017년 10월 20일 금요일

uitableview header top spacing issue

self.automaticallyAdjustScrollViewInsets = false