Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Change the height of UIPageControl?

I am trying to change the height of UIPageControl how I can achieve that?

like image 863
Ahmad Kayyali Avatar asked May 18 '11 10:05

Ahmad Kayyali


5 Answers

This is how you do that

Change the width to something strange, 153

Now open the xib as source.

Find 153

Nearby you should see number 36. Change that to the height you want.

Tada...... :)

like image 75
Septiadi Agus Avatar answered Nov 03 '22 13:11

Septiadi Agus


Agree With Mike

You can change your UIPageControl height using its frame..

ex

 pgControl.frame = CGRectMake(X , Y , Width , Height that you want);
like image 45
Mehul Mistri Avatar answered Nov 03 '22 15:11

Mehul Mistri


Not using interface builder, but you can specify a new frame in code:

pageControl.frame = CGRectMake(x, y, width, height);
like image 9
Mike Weller Avatar answered Nov 03 '22 15:11

Mike Weller


Drag UIView in your XIB, then change Its class to UIPageControl

like image 2
user807146 Avatar answered Nov 03 '22 15:11

user807146


I had the same issue, but wanted to solve it in storyboard. Just drop a new View to your windows main view. Then drag the UIPageControl item to the new View. Now you can adjust the height of the new view as desired. The contained UIPageControl is clipped accordingly. Most properly you have to adjust the position of the UIPageControl inside the new view to get a proper display. Don't forget to set "Clip Subviews" for the new view.

like image 2
upslupo Avatar answered Nov 03 '22 14:11

upslupo