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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:30:58+00:00 2026-05-23T20:30:58+00:00

I am programmatically building a UINavigationContoller for iOS and am having problems making it

  • 0

I am programmatically building a UINavigationContoller for iOS and am having problems making it fully accessible. In loadView I create the main UIView and set it as NOT accessible:

    - (void)loadView
    {
    CGRect viewRect = [[UIScreen mainScreen] applicationFrame];
    UIView *tmp = [[UIView alloc] initWithFrame:viewRect];
    [tmp setIsAccessibilityElement:NO];

I then add additional UIViews that contain just background images and also set those as not accessible. All views and controls are added onto the “tmp” UIView created above. Here is a “background” view example:

UIImage* microphone = [UIImage imageNamed:@"microphone.jpg"];
    UIView* microphoneView = [[[UIView alloc] initWithFrame: CGRectMake(0,0,viewRect.size.width, microphone.size.height)] autorelease];
    [microphoneView setBackgroundColor:[UIColor colorWithPatternImage:microphone]];
    [microphoneView setIsAccessibilityElement:NO];
    [tmp addSubview:microphoneView];

Finally I add a UIButton, UILabel and UIButtonBarItem. I add these last so they are on the top of the view hierarchy. I add accessibility labels and traits to them. Here is the UIButton:

self.recordImage = [UIImage imageNamed: @"record_button.png"];
self.stopRecordImage = [UIImage imageNamed: @"stop_button.png"];
self.recordButton.accessibilityTraits |= UIAccessibilityTraitStartsMediaSession;
self.recordButton = [[UIButton alloc  ] initWithFrame: CGRectMake((viewRect.size.width - recordImage.size.width)/2 , (microphone.size.height + (grayBkg.size.height - recordImage.size.height)/2), recordImage.size.width, recordImage.size.height)];
[self.recordButton setIsAccessibilityElement:YES];
[self.recordButton setAccessibilityLabel:  @"toggle recording start"];
[self.recordButton setImage: recordImage forState:UIControlStateNormal];
[self.recordButton addTarget: self action:@selector(processButton:) forControlEvents:UIControlEventTouchUpInside];
[tmp addSubview:recordButton];

finally

....
[self setView:tmp];
[tmp release];

I did call UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, nil); when I push this view onto the stack.

With voiceover on, when the view is displayed I can swipe and give each of my elements (the UIButtonBarItem, UILabel, and UIButton) focus and I can activate them with double tap. However, VoiceOver speaks no information about the elements. Testing in the simulator with the Accessibility Inspector shows the labels I have set via aControl.accessibilityLabel = @”the label”;

This view is used to record audio. If I activate the buttons and record the audio and stop recording, VoiceOver will now speak the labels for the elements when I focus them? Why is VoiceOver not speaking the information when the view first loads? Any clues appreciated!

I am testing on an iPad 2 with iOS 4.3.3.

  • 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-23T20:30:59+00:00Added an answer on May 23, 2026 at 8:30 pm

    This view is being used for audio recording. The problem was that I was setting the AVSession Category to AVAudioSessionCategoryRecord in the viewDidLoad method. This was causing VoiceOver not to speak the view information. I modified the code to set the category to AVAudioSessionCategoryRecord only when the record button is pushed. And I set it to AVAudioSessionCategoryPlayAndRecord when recording is finished. Here is the thread that explains it fully: http://lists.apple.com/archives/accessibility-dev/2011/Jul/msg00002.html

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

Sidebar

Related Questions

I am building a VPN application where I need to set DNS server programmatically.
I'm developing on iOS and I'm building my views programmatically. I noticed that when
I have a map of a building and I'd like to programmatically highlight specific
How do I programmatically set the record pointer in a C# DataGridView? I've tried
I would like to programmatically create a gloss effect on an Image, kinda like
I'm building a UITableView programmatically without NIB files here. I'm doing something silly however,
I'm building a jar so that other developers can use the view I create
I have created a custom module and am using hook_block to programmatically create some
In programmatically building cubes for SQL Server Analysis Services using AMO, I've discovered that
My app is building purely programmatically on UITabBarController above a UINavigationController, which are both

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.