Skip to main content
Home

Main navigation

  • Apps
  • Forum
  • Blog
    • Podcast
    • Guides
    • Hardware & Accessory Reviews
    • Bug Tracker
    • Developer Resources
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. App Development and Programming

VoiceOver with UISegmentedControl in Swift

By trifusion, 8 September, 2016

Forum
App Development and Programming

I am trying to add VoiceOver to a Segmented Control but the Apple example code does not work with Swift 3:

The Objective C code:
NSString *title = @”∫”;
title.accessibilityLabel = @”Integral”;
[segmentedControl insertedSegmentedWithTitle:title];

does not work with Swift like this:
var title: NSString = "∫"
title.accessibilityLabel = "Integral"
segmentedControl.insertSegment(withTitle: title, at: 0, animated: false)

Swift will only accept a String but I need to add an NSString since it has the VoiceOver attributes.

Can any help with this?

Is there a better approach for adding accessibility or VoiceOver to a segmented control?

Thanks

Greg

Options

  • Log in or register to post comments

More Like This

Making Swift Playgrounds accessible (Forum Topic)
How to tie Voiceover into an MPVolumeView Slider? (Forum Topic)
Help Me Learn Swift + Towers of Hanoi (Forum Topic)
Big Brain Quiz (Forum Topic)
VoiceOver with Apple Watch Controller Title (Forum Topic)
which audio games do you think it can have IOS version (Forum Topic)
need help in the built in notes app on the IPhone5s (Forum Topic)
using Voice Control to delete apps (Forum Topic)

Site Information

  • About
  • Club AppleVis
  • FAQ
  • Contact

Unless stated otherwise, all content is copyright AppleVis. All rights reserved. © 2022 | Accessibility | Terms | Privacy