• 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
Re: [iPhone] Adding a UIView to current view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iPhone] Adding a UIView to current view


  • Subject: Re: [iPhone] Adding a UIView to current view
  • From: Philip Vallone <email@hidden>
  • Date: Thu, 21 Jan 2010 18:58:54 -0500

Thank you Luke,

That was it.

Thanks,

Phil

On Jan 21, 2010, at 6:38 PM, Luke the Hiesterman wrote:

> Standard first question: did you verify that myBubble is non-nil?
>
> Another note: it's weird that you do [self.view addSubview:myBubble] when through the rest of the method you always use self.myBubble. You should stick to using your property.
>
> Luke
>
> On Jan 21, 2010, at 3:33 PM, Philip Vallone wrote:
>
>>
>> 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
>

_______________________________________________

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

References: 
 >[iPhone] Adding a UIView to current view (From: Philip Vallone <email@hidden>)
 >Re: [iPhone] Adding a UIView to current view (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: [iPhone] Adding a UIView to current view
  • Next by Date: Re: NSRulerView and inches
  • Previous by thread: Re: [iPhone] Adding a UIView to current view
  • Next by thread: NSTabViewDelegate
  • Index(es):
    • Date
    • Thread