It is not possible to add a UIImageView directly as a subView to UIWebView. So if you want to add a UIImageView object as a subview to UIWebView, use the following code.
Consider a UIWebVIew object myWebView, to which you want to add a UIImageView object, myImageView.
Now you can add myImageView to myWebView as follows :
|
1 2 |
[[[myWebView subviews] objectAtIndex:0] addSubview:myImageView]; // This will do the trick. |
In this code, we are adding the UIImageView object to the subview of the UIWebView, which is a UIScrollView.
Incoming search terms:
- uiwebview addsubview
- uiwebview uiimage
- adding imageview dynamically in xcode
- UIwebview addsubview uiimageview
- uiwebview code for xcode
- uiwebview subview
- xcode 2 imageviews subview
- xcode add image to subview
- Xcode how to add imageView in UIView
- uiimageview xcode3 2




