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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:20:16+00:00 2026-06-06T20:20:16+00:00

I use the Paging-Functionality of the UIScrollView for paging several Views (an array of

  • 0

I use the Paging-Functionality of the UIScrollView for paging several Views (an array of Views).

ViewController
– View
– ScrollView

My main UIViewController contains a View, inside the View the UIScrollView, which is connected via outlet to my ViewController.h.
I created an xib-File to add a custom View (MyView) to the project; same with the class; i add a subclass of UIView, named MyView. The outlets from MyView.xib I connected to the MyView.h. And changed the Class in MyView.xib from UIView to MyView.

To interact with the MyView.xib out of the ViewController (UIScrollView…), i added a property to ViewController
@property (nonatomic, weak) MyView *myView;
So i’m able to set text, background-color and something else of MyView.

The whole stuff works as it should, but i’m not sure – is it bad-style? So I ask you guys; is that ok what I do, or isn’t it?

  • 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-06T20:20:18+00:00Added an answer on June 6, 2026 at 8:20 pm

    It’s actually excellent style.

    My main UIViewController contains a View, inside the View the UIScrollView, which is connected via outlet to my ViewController.h. I created an xib-File to add a custom View (MyView) to the project; same with the class; i add a subclass of UIView, named MyView. The outlets from MyView.xib I connected to the MyView.h. And changed the Class in MyView.xib from UIView to MyView.

    That’s the point of the class label in IB. Elements were meant to be subclassed, and in doing so, allow for deeper customization than the standard UIKit class has built-in.

    To interact with the MyView.xib out of the ViewController (UIScrollView…), i added a property to ViewController @property (nonatomic, weak) MyView *myView; So i’m able to set text, background-color and something else of MyView

    Again, a brilliant, but often overlooked aspect. Interface builder outlets were always meant to be weak (or assign), because they are usually maintained by strong top-level objects (say, superviews, or classes). The upside to making it weak is that when your class is deallocated, so are the weak outlets, automatically! See here for some better explanations of why IBOutlets should be weak.

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

Sidebar

Related Questions

I have a site, which uses paging. I use the following plugin for tooltips:
Does Android support virtual memory concept? I read it does use paging but not
I use a paging system like this: <?php $p = $_GET['p']; switch($p) { case
I use the ASPxGridView with paging, pager settings is next: <SettingsPager Mode=ShowPager Position=Bottom Visible=true>
I use infinite scroll for paging. And it was working fine until today. Today
I use jquery pagination plugin for paging... If there is one pagination plugin there
I am trying to use the ObjectDataSource with enabled paging. This requires me to
I'm using preg_replace to create urls for modrewrite based paging links. I use: $nextURL
Should I use LINQ's Skip() and Take() method for paging, or implement my own
Most OSes use paging for virtual memory. Why is this? Why not use segmentation?

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.