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 7828605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:24:49+00:00 2026-06-02T10:24:49+00:00

For a single view app, a DrawView class is added, which is a subclass

  • 0

For a single view app, a DrawView class is added, which is a subclass of the UIView class.

It is used as the main view for the app, so the drawRect method of this class works well, can draw things, for example, but the code generated by Xcode has a line “// Initialization code” to indicate putting init code right there, inside of initWithFrame, but I put some code in there and it is not called, and a break point is set there but it never stops there? I then added an init using the usual method and it is not called either?

  • 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-02T10:24:56+00:00Added an answer on June 2, 2026 at 10:24 am

    Try overriding -(id)initWithCoder:(NSCoder*)coder. I believe when a view is loaded from a nib it uses this init method. See this question.

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

Sidebar

Related Questions

If a Single View app is created, with a FooView that subclasses UIView ,
It is really strange that for a Single View app, I added a MainView
I am developing an app (XCode 4 with storyboards, iOS5, single view app) that
I create a brand new Single View Application iPhone app in Xcode 4.2, it
I created a single view project in xcode 4. I added a navigation bar
I'm using an NSViewController class with a single view in it to display a
After we create a Single View App on Xcode 4.3.2, are there a couple
I made a single view app for the ipad, with a movie, webview and
My iPhone app (based on the Single View Application of Xcode) has a UITextView
If I just start a brand new Single View App project on Xcode 4.3.2,

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.