Reputation: 16841
I need to create a transparent UIView
with an UIActivityIndicator
and an UIImage
on it.
I found a code from a tutorial as in how to create the Round edge UIView
.
Can someone help me call this UIView
from my UIViewController
class. (To call a UIViewConroller
from another UIViewController
we use the following code;)
ViewOne *v1 = [ViewOne alloc] initWithNibName:nil bundle:nil]; [self.navigationController v1 animated:YES];
but this doesn't work when calling UIView's. So how can i call it ?
Upvotes: 0
Views: 1504
Reputation: 3377
Every view controller has a view property. Just use UIView *yourView = yourViewController.view
to get it. From there you can use [yourView addSubView:someOtherView]
to add the activity indicator and the image, as well as setting the transparency.
Upvotes: 1
Reputation: 47751
wouldn't you just wire up the UIView to an IBOutlet, and then just add your programmatically created view to the outlet
Upvotes: 0