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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:42:24+00:00 2026-05-24T16:42:24+00:00

I have been working on the front-end to a universal iOS app, setting up

  • 0

I have been working on the front-end to a universal iOS app, setting up separate iPhone and iPad view controllers as subclasses of a XIB-less view controller (as described in http://www.kotancode.com/2011/04/05/ios-universal-apps/). Each subclassed view controller contains a device-specific XIB, with each XIB containing portrait and landscape UIViews which are switched upon orientation change (I followed http://aseriesoftubes.com/articles/ipad-development-101-orientation/ for this). The controls common to all four UIViews are synchronised with an IBAction method linked through IBOutletCollections.

Just today I have created a UISlider subclass for my own slider design, which appears to work fine, apart from one large issue: when testing with the iPhone in the simulator starting in portrait orientation the slider works fine; when switched to landscape it is also fine; however when I switch back to portrait the slider works for up to two operations and then freezes, taking some other controls of the view with it; stranger still, if I switch back to landscape the slider works fine! This happens only with the iPhone simulator, not the iPad.

I have tried switching IB’s ‘Continuous’ option on and off, and tried both the ‘Touch Up Inside’ and ‘Value Changed’ connections from my slider’s Sent Events, with no change (as it will be for a volume control I will need ‘Value Changed’ to work). My slider’s implementation code is thus:

@implementation VolumeSlider

- (id)initWithCoder:(NSCoder *)decoder
{
    if((self = [super initWithCoder: decoder]))     // Double paretheses to silence warning
    {
        // Instantiate slider images
        UIImage *thumbImage = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"volume thumb" ofType: @"png"]];
        UIImage *trackImage = [[UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"volume track" ofType: @"png"]] stretchableImageWithLeftCapWidth: 20 topCapHeight: 0];

        // Set control elements with images
        [self setThumbImage: thumbImage forState: UIControlStateNormal];
        [self setMinimumTrackImage: trackImage forState: UIControlStateNormal];
        [self setMaximumTrackImage: trackImage forState: UIControlStateNormal];
    }

    return self;
}

- (void)dealloc
{
    [super dealloc];
}

@end

The two action methods that the sliders trigger are:

- (IBAction)volumeChange:(id)sender
{
    NSLog(@"VOLUME slider changing");

    // VOLUME slider action
}

- (IBAction)volumeChangeFinish:(id)sender
{
    NSLog(@"VOLUME change finished");

    VolumeSlider *incomingVolume = sender;

    for(VolumeSlider *volumeSlider in self.volumeSliders)
    {
        volumeSlider.value = incomingVolume.value;
    }
} 

(volumeChange will use the slider value to change volume in real time, volumeChangeFinished will update the other sliders in the view on touch inside up.)

This one has me stumped – it feels like a memory issue but I can’t figure out exactly where. Does anyone have an idea what could be causing this?

(Mac OS 10.6.8, Xcode 4.0.2, building for iOS 4.3)

UPDATE —

I have tried instantiating a new, stock UISlider into the iPhone view and this suffers the same problem, without having been connected up to anything. This points towards an issue with the view controller, or even some bug.

  • 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-24T16:42:26+00:00Added an answer on May 24, 2026 at 4:42 pm

    Although I have no definitive reason for the issue, I have managed to fix this. Basically I created a new UIView for the iPhone portrait orientation in Interface Builder, rebuilt the interface and connected it up in place of the dodgy one and the issue was gone. I don’t know if I could have had a corrupted view in the XIB, that’s the only answer I can proffer.

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

Sidebar

Related Questions

I am working on a Flex Front End at the moment, and have been
I've been working through an ordered ManyToManyField widget, and have the front-end aspect of
I am working on a front-end web app where a nested unordered list would
I have been working on a web services related project for about the last
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with a string[] array in C# that gets returned from
We have been working with CVS for years, and frequently find it useful to
I have been working on some legacy C++ code that uses variable length structures
I have been working with relational databases for sometime, but it only recently occurred
I have been working as a native C++ programmer for last few years. Now

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.