My application is developed using Xamarin.iOS and I need to make it accessible. We couldn't find any help to achieve large text accessibility in xamarin.iOS. I found this link which explains how to achieve it in Xamarin.Forms and this about MonoTouch. Could someone help me how to achieve Large text accessibility on Xamarin.iOS.
How can we achieve large font accessibility in Xamarin.iOS?
999 Views Asked by Narender Reddy At
2
There are 2 best solutions below
6
SushiHangover
On
Assign one of the UIFontTextStyles to your UI elements and when the app starts the element's text size will be set based upon the UIFontTextStyle and the user's current Accessibility Larger Text setting:
var uiLabel = new UILabel(new CGRect(40, 40, 200, 40));
uiLabel.Text = "StackOverflow";
uiLabel.Font = UIFont.GetPreferredFontForTextStyle(UIFontTextStyle.Body);
View.AddSubview(uiLabel);
If you want to dynamically response to the Accessibility Larger Text changes so the user does not have to restart your app, subscribe to UIContentSizeCategoryDidChangeNotification and update your views:
NSNotificationCenter.DefaultCenter.AddObserver(
new NSString("UIContentSizeCategoryDidChangeNotification"),
(NSNotification obj) =>
{
Console.WriteLine("Update layouts/subviews/layers/etc...");
View.SetNeedsLayout();
},
null
);
Related Questions in XAMARIN
- Xamarin Table View Crash
- How to read a characteristic (e.g. in WICED Smart example "speed_test")
- Using Azure MobileServices library with my own LAN WebApi
- Bundle Multiple Xamarin apps in one pkg installer
- Xamarin Google Cloud Messaging GcmClient.CheckDevice(this) causes runtime error
- UIAlertView popup won't let me swipe up Control Center
- How do I Insert a Previously Created SQLite Database into a Xamarin.Android App?
- Can custom text be added to a listview cell?
- How to run a ASP.net project to Xamarin Studio
- How can i do a fill animation in Xamarin.Forms
- How to change Display Alert default focus on a button?
- Mixing a CocosSharp game with UIViewControllers
- Building C# code in VSCode on Mac
- How to use research Kit framework in Xamarin
- Why is my app requesting permissions I didn't ask for?
Related Questions in XAMARIN.IOS
- Xamarin Table View Crash
- Hiding Elements in a Monotouch Dialog Section - Height does not change
- Custom UIRefreshControl animation
- How to use research Kit framework in Xamarin
- Convert Objective C to Monotouch (Rounded Table Grouped)
- UITableViewCell (MTD) rectangle style cell
- Offline authentication best practices in Xamarin
- How to add Checkbox in Xamarin.Forms in Xaml file?
- How do you enable stack smashing protection for an iOS app built with Xamarin?
- CLLocation DistanceFrom performance implications
- storyboard not opening in xamarin ios designer
- Can't upload image from Gallery with request.Addfile on iOS
- Methods that use convertPoint:fromLayer implicitly in Xamarin.iOS/MonoTouch
- Xamarin.iOS Linker removes members in class needed for reflection
- Xamarin for iOS: All Controls null in initial view controller
Related Questions in ACCESSIBILITY
- Links with images and text - combined or separate?
- Why would an `a` tag need `tabindex=0`?
- How to set priority for screen readers of some HTML page parts?
- How to specify a general note for screen readers in html
- Adobe Reader cannot correctly read out loud table in tagged document
- Implementing accessibility in viewpager android to have a "swipe next for more" kind of thing
- Android WebView accessibility in Lollipop
- What elements receive default focus styling?
- talkback reads capital letters as a word, it should read separate
- Accessibility Check fail when using TextInputLayout
- Find all display:none attributes and add in aria-hidden attribute using JavaScript
- Inconsistent Accessibility Error #2
- event.getSource() returns null on View_Focused using Accessibility in Android
- iOS Voice Over to announce new view titles when pushed/popped on a UINavigationController
- Prevent Voiceover from reading UIAccessibility accessibilityLabel
Related Questions in FONT-SIZE
- Webpage - Font size of table items on mobile phone browsers changes
- Font Scaling on iPhone 6 plus looks like rasterized scaling in Revolution Slider
- Resizing font based on html length
- Internet Explorer iconfont problems
- Windows phone Store app Font size Issue
- Android EditText setHint's font size dynamically
- Change font size of likert plot legend and value label arrangement
- How to style Font Awesome in HTML document
- how to set different font sizes in the same html header?
- What is the fontawesome default font em size?
- jQuery: Change font size with slider as soon as it is activated - how?
- Let the user change font size
- Changing font-size of h1/h2/h3 with button on my website (Using local storage)
- Default font size of WPF Run object?
- How to change font size of validation result in WPF C#
Related Questions in LARGE-TEXT
- Ignoring android large text settings changes in android application?
- Datatype sizes and storage in mysql
- Issues while Processing Large Strings in Grails Application
- How to make EditText Can Handles 14 KB text (Kotlin)
- How can we achieve large font accessibility in Xamarin.iOS?
- Large font size of hypelink text on wordpress
- Cannot display a Unicode character (Emoji) in an Android TextView with large text: "Font size too large to fit in cache"
- How to open a large text file in C#
- Click to make body text larger | JavaScript
- suitable data type to save string larger than 8000 charachter
- Search many strings over a very large text
- How can I resolve Memory Error in Python?
- Create large text field in Eloqua using REST API
- StaticLayout OutOfMemoryError with large text
- How to detect if a label text is truncated, in Xamarin Forms?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
MonoTouch and Xamarin.iOS are the same thing, just a different name.
It is achieved in the exact same way, where you set the
Fontproperty of yourUILabelorUITextFieldto one of the available fonts in theUIFontstatic class like so:This should automatically scale the fonts according to your Accessibility settings on iOS.