• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[iPhone] Adding a UIView to current view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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

  • Follow-Ups:
    • Re: [iPhone] Adding a UIView to current view
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: CALayer resizing puzzle
  • Next by Date: Re: [iPhone] Adding a UIView to current view
  • Previous by thread: Re: CALayer resizing puzzle
  • Next by thread: Re: [iPhone] Adding a UIView to current view
  • Index(es):
    • Date
    • Thread