Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8527613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:36:22+00:00 2026-06-11T08:36:22+00:00

I have 2 UIViews both with a bit off code in them. I can

  • 0

I have 2 UIViews both with a bit off code in them.

I can subclass one to a UIViewController like this self.view addSubView:_msgView];
_msgView being a UIView.

Now _msgView is a Plain UIView that has a 0.7 Alpha to lay over the UIViewController.

now I have another UIView called menuButtons and I want to put that on top of the _msgView.

I was thinking I could use [_msgView addSubView:_menuButton]; but that does not work and gives a warning

Incompatible pointer types sending ‘MenuButtons *__strong’ to parameter of type ‘UIView *’

How do I put a UIView on top of another UIView?

//EDITS:

#import <UIKit/UIKit.h>
#import "SlideMessageView.h"
#import "definitions.h"


@interface MenuButtons : UIView
{
UIButton *onBack;
UIButton *onForward;
UIButton *onRefresh;
UIButton *onHome;
UIButton *onSafari;
UIButton *onChrome;
UIButton *onPocketReader;
UIButton *onSavePDF;
UIButton *onPrint;
UIButton *onShare;

SlideMessageView *msgView;

BOOL viewVisible;
}

The UIButtons have their @properties set below that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:36:23+00:00Added an answer on June 11, 2026 at 8:36 am

    you do 1 thing.. if u are generating both the views through code then add both views in self.view itself and set their frames separately.

    i.e if 1st view is at top set the frame msgview.frame = CGRectMake(0,0,320,100);
    ans for second view someview.frame = CGRectMake(0,100,320,200);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in -(void) viewDidLoad : for(UIView *subview in self.view.subviews) { if([subview
I have a little app up that has both CCLayer view and UIView. That
I have several UIViews in my Storyboard and, of course, I can switch between
I have a two UIViews filled with UIButtons. I want to only allow one
I have one (1) .xib with two UIViews, one on the top 1/3, the
I have some UIImageViews that are nested in UIViews, which group them together. They're
My issue is basically the the same as this one . I have a
I have a UIViewController that has both a UITable and a UIView on it.
I have a UIView set as shadow, and I put this view behind a
I have a bunch of UIViews stacked one upon the other(not nested). I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.