mardi 23 septembre 2014

[Python] __code__ and decorator



http://stackoverflow.com/questions/1166118/how-to-strip-decorators-from-a-function-in-python

http://stackoverflow.com/a/1167248

[iOS] viewDidLoad viewDidAppear viewWillAppear

viewWillLoad/viewDidLoad - called when the view is constructed (via the first call to retrieve the view controller's UIView via it's view property - aka lazy loading)
viewWillAppear: - when the view is being prepared to appear either immediately (animated == NO) or view a transition (animated == YES)
viewDidAppear: - if the view appearance wasn't cancelled and the view controller's view fully appears
viewWillDisappear: - complements viewWillAppear:
viewDidDisappear: - complements viewDidAppear:

viewWillUnload/viewDidUnload - deprecated APIs when the view is unload due to memory constraints (don't worry about these anymore)

Source : http://stackoverflow.com/questions/22214843/ios-7-difference-between-viewdidload-and-viewdidappear

dimanche 21 septembre 2014

[iOS 8] Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead

If you have this message :
<<
Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead.
>>


then just write :
<<
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 44;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 44;
}
>>

Categories