简体   繁体   中英

MonoTouch: UIAlertView with UITextField?

I'm looking for an UIAlertView with a UITextField .

I've looked at this sample: http://www.kevfoo.com/2009/11/monotouch-uialertview-uitextfield-crazy-delicious

But the sample is broken and I'm not skilled enough to fix it. The TextFieldAlertView class' LayoutSubviews gets called 3 times and I think this is messing up the view. I can't seam to fix it.

Are there a working sample of an UIAlertView with a UITextField that works with MonoTouch?

From Apple documentation :

Subclassing Notes

The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.

This is not supported - that means that:

  • You can do it;
  • A lot of people are doing it;
  • It will break as often as Appple want to make changes in it;
  • Be warned that there are reports (try Googling) of people being refused in the AppStore for doing so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM