Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
- Run the attached sample project
- ViewDidAppear calls SetNeedsFocusUpdate for button D
- Focus goes to button A
- Focus to be on button D
=== Xamarin Studio ===
Version 5.10 (build 988)
Installation UUID: 5df374dd-127a-4b3e-bfa6-0a872d52b886
Mono 4.0.4 ((detached/d481017)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400040004
=== Xamarin.Profiler ===
=== Apple Developer Tools ===
Xcode 7.1 (9079)
=== Xamarin.Mac ===
Version: 188.8.131.52 (Starter Edition)
=== Xamarin.iOS ===
Version: 184.108.40.206 (Business Edition)
Build date: 2015-10-27 01:36:02-0400
=== Xamarin.Android ===
Version: 220.127.116.11 (Business Edition)
Android SDK: /Users/vincentr/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.4 (API level 19)
5.0 (API level 21)
SDK Tools Version: 24.1.2
SDK Platform Tools Version: 22.0.0
SDK Build Tools Version: 22.0.1
Java SDK: /usr
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
=== Xamarin Android Player ===
=== Build Information ===
Release ID: 510000988
Git revision: e2bb36197f892ea0fd385585a02cf68cf4f03b5f
Build date: 2015-10-26 12:23:51-04
Xamarin addins: b333d5f54ab244893787ad30eee07e43112fe175
Build lane: monodevelop-lion-xcode7.1
=== Operating System ===
Mac OS X 10.10.5
Darwin Vincents-iMac.local 14.5.0 Darwin Kernel Version 14.5.0
Wed Jul 29 02:26:53 PDT 2015
There's no attachment to the bug report.
Attachment is too large. Posted on dropbox;
Created attachment 13699 [details]
Cleaned bin and obj from Vincent's sample project, uploaded directly
That's fairly new to me but my understanding of  is that the update is controlled by `PreferredFocusedView`.
It's also very uncommon, in iOS API, to call a method on a instance that affect it's parent state, e.g.
> btnD.SetNeedsFocusUpdate ();
does not change the `btnD` parent focus (but it's own).
In you sample you should add:
public override UIView PreferredFocusedView
so you return which UIView you want to focus (null is fine). The when your viewcontroller ViewDidAppear is called set the `focus` to `btnD` and tell the `UIViewController` that an update to the focus is needed.
public override void ViewDidAppear (bool animated)
focus = btnD;
This resolved my issue.