objective c - iOS Layout Change on Hiding a view -
if have 3 uilabel
s on view next each other, best approach hiding middle one, , third 1 shift , take it's space?
so example:
first line second line third line
if hide second line, doesn't show. still takes space. end this:
first line third line
what considered 'best' approach making third line slip second lines space? i've been looking @ uicollectionview
, seems bit extreme.
i write bunch of code builds view up, putting things in order should be, involve significant chunk of work, , i'm there's simpler way... maybe i'm wrong!
any great!
thanks.
(in android native/java free. :-)
it not of code if removing one.
[secondlinelabel sethidden:yes]; [thirdlinelabel setframe:[secondlinelable frame]];
the problem comes when want second lable re-appear. need store frame somewhere.
if more lables in row more general useful. might want think using table. can embed tables view layout along other view items. , can quite introduce own simple uitableviewcell
carries 1 rather small label without wasting surrounding white space. plus have set table's cell height making happen.
Comments
Post a Comment