[iPhone] Adding a UIView to current view
[iPhone] Adding a UIView to current view
- Subject: [iPhone] Adding a UIView to current view
- From: Philip Vallone <email@hidden>
- Date: Thu, 21 Jan 2010 18:33:16 -0500
Hi List,
I have a UIView (BubbleView) that I want to add to my current view (a loading splash screen). I have synthesized "myBubble". I have a method that when called is suppose to add the view, but the view doesn't show up.
I am not sure what I am missing....
ChapterViewController.h
@interface ChapterViewController : UIViewController <UIActionSheetDelegate> {
BubbleView *myBubble;
}
@property(nonatomic, retain )BubbleView *myBubble;
ChapterViewController.m
- (void) showLoading{
self.myBubble.frame = CGRectMake(30, 100, 260, 220);
self.myBubble.backgroundColor = [UIColor clearColor];
CGRect contentRect = CGRectMake(35, 30, 240, 40);
UILabel *textView = [[UILabel alloc] initWithFrame:contentRect];
textView.text = @"Loading ...";
textView.numberOfLines = 1;
textView.textColor = [UIColor whiteColor];
textView.backgroundColor = [UIColor clearColor];
textView.font = [UIFont systemFontOfSize:22];
[self.myBubble addSubview:textView];
UIActivityIndicatorView * activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(110, 100, 50, 50)];
activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[activityIndicator startAnimating];
[activityIndicator hidesWhenStopped];
[self.myBubble addSubview:activityIndicator];
[self.view addSubview:myBubble];
[activityIndicator release];
[textView release];
}
Thanks for the help,
Phil
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden