I want to generate buttons on a view using a loop .
suppose I want to generate 3 buttons. I have added a uiview btnframe to my main view. now I want to add button inside that view using that view’s coordinates. how do I calculate btnframe’s bounds?
I want to generate buttons on a view using a loop . suppose I
Share
Well what size do you want your buttons to be? If you add them to a view they inherit those cordinates so if you do 0,0 it will be in the top left corner of the view you add it to.
The basics, this would give you three buttons.
If you want a grid something like this would work.
This gives you 25 buttons, 5 on each row.