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

  • SEARCH
  • Home
  • 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 413859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:13:32+00:00 2026-05-12T18:13:32+00:00

I am trying to create a custom UIView that is stored in a nib

  • 0

I am trying to create a custom UIView that is stored in a nib so that I can position it using Interface Builder.

I have created a class called RippleView that extends UIView. I’d like to position this view as a subview using Interface Builder. To do so, I’ve dragged a new view into my existing view in Interface Builder and gave it the RippleView class identity. I then linked my RippleView outlet to the view I just created.

In the RippleView class, I’ve implemented initWithCoder which doesn’t do anything other than call [super initWithCoder…]. In awakeFromNib I go ahead and initialize my code.

Now, for some reason, if I try to check the bounds of the RippleView in awakeFromNib, I get ridiculous values (0 width and 1081171968 height). These bounds don’t change in drawRect, so I don’t think it’s an issue of the view not being initialized. I get similar values in my touchesMoved event handler.

I had no problems when I was programmatically creating the subview (initWithFrame). What could be causing the frame bounds to go haywire?

  • 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-05-12T18:13:33+00:00Added an answer on May 12, 2026 at 6:13 pm

    Solved! The issue had nothing to do with the code. The UIView bounds are floats and I was printing them as integers. It’s things like this that separate the programmers from the dropouts :p

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

Sidebar

Related Questions

I'm trying to create a custom UIView that can be displayed at any point
Hope you can help. I have created my own Custom UIView and I'm trying
I am trying to create a custom popup view that can be called from
I have subclassed UIView and created a NIB that controls the main logic for
I have created a custom UIView that I would like to use on multiple
I'm trying to create a custom TabItem that is dynamically added to a TabControl
I'm trying to create a custom form input that utilizes some images, it should
I'm trying to create a custom component to extend PrimeFaces. I have a simple
I'm trying to create a custom usercontrol that acts like a button, but i
I'm trying to create my own custom UIView for the header of a grouped

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.