ios - Add Bubble view dynamically -
hi guys, have achieve above design. here no of bubbles dynamic (maximum 8) , size of each bubble dynamic. have designed bubbles dynamically can't find out way add bubbles (i mean in position, bubble) output looks above.
bubble formed randomly each , every times 2 bubbles
for 4 bubbles
but there no particular logic time 2 , 4 bubbles position same.
to honest far away start cause couldn't figure out logic. idea, appreciable. thank you.
do:
- create class method set frames
prepare layout how display. depend on no of bubbles.
for ex:
if 1 bubble show in center screen
if 2 bubbles show both in 1 line
if 3 bubbles make round display
if 4 bubble square display
if 5 bubbles shape shown image here above
so define frames buttons checking no of bubbles. after you'll need use class code. automatically take frames defined in class.
Comments
Post a Comment