tags:

views:

33

answers:

2

Good Day!

i want to add a subview in another view in iphone. and i want that child view to be of size which i want like if i want to change its height/width i can. Can somebody please suggest me something or help me out in this regard.

Thanks in advance

+2  A: 

you can do it by

UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]  ;
[self.view addSubview:newView];
mihirpmehta
but i want to integrate google adsense into this new uiview. how can i do that,
Ch Sab
Use UIWebView and it's method loadHTMLString or something similar...
mihirpmehta
A: 

do you want the user to resize your view?

OR do you just want to add images to your view (which you could update and resize)?

jAmi
actually its google ads of height 50 and width of iphone which i want into that view to be shown but i am not able to code the google ad sense into the view (the example came with google adsense does not uses any view). and i dont have any idea about it.
Ch Sab
What is the file Format of Google Ad ? (sorry but I am not familiar with Google Adsense).if it is an Image then you can use UIImageView to show this Image. If its some sort of HTML Content then you can use UIWebView.Also once loaded you can alter the Frame property of both these UIViews to make it according to your size.
jAmi