iphone - Destroy UIView in init if condition isn't met -
i'm trying make custom alert view checks see if condition true, , if builds , attaches window. however, if condition not true, want view deallocate itself, preferably in init
method. best way accomplish this?
well better follow solid principles in coding.
singularity important thing.one function supposed single thing not many dependencies.
so keep view show custom alert.and check showing must done outside such
//please note algorithm not exact code in obj-c. if(condition==true) { //display customview } else { //do nothing }
Comments
Post a Comment