monotouch.dialog

Custom components are not being rendered because problems were detected

℡╲_俬逩灬. 提交于 2019-12-11 05:28:38
问题 I'm building an app on visual studio xamarin.ios but the story board opens up with this message "custom components are not being rendered because problems were detected". I've tried deleting directories named "bin" and "obj" in the project's folder yet the problem persists. Also a log file comes up saying "MonoTouchDesignServerUnified quit unexpectedly". Here is a screenshot of the log file. 回答1: There is a bug in current version of Xamarin on how it handle the UIViewController define in

MonoTouch.Dialog: EntryElement's background color

假如想象 提交于 2019-12-11 05:06:56
问题 How is the background color of a EntryElement changed in MonoTouch.Dialog ? 回答1: public class PaperEntryElement: EntryElement { public PaperEntryElement(string caption, string placeholder, string value) : base(caption,placeholder,value) { } public override UITableViewCell GetCell(UITableView tv) { var cell= base.GetCell(tv); cell.BackgroundColor = UIColor.FromPatternImage(MediaProvider .GetImage(ImageGeneral.paper_tile)); return cell; } } 来源: https://stackoverflow.com/questions/13203265

Monotouch: Force UITableView to recalculate height of each cell without reloading data

二次信任 提交于 2019-12-11 02:43:14
问题 I have a custom cell created using OwnerDrawnElement with autoresizeable UITextView in it. When text changed there should be appropriate layout redraw and cell height recalculation. The problem is how to preserve keyboard opened. There is a method inside UITableView - ReloadRows which actually helped me in some fashion. I can't call it for my cell because it is the first responder and can't I cant resign it. But when I call it for another cell my cell is getting resized as I wanted but I have

Monotouch.Dialog and iAds

我们两清 提交于 2019-12-11 02:39:02
问题 I'm playing with iAds. I want to add it to an app that is basically a bunch of Monotouch.Dialog views. Is the best practise to add a UIViewController , then add a ADBannerView and a Monotouch.Dialog to it , or should I add the iAds view to the Monotouch.Dialog ViewController? 回答1: I created a wrapper ViewController that works nicely, just pass in the main app's view like a TabBar or SplitView etc and use IADViewController as the RootViewCOntroller: public partial class IADViewController :

MonoTouch Dialog. Buttons with the Elements API

不羁岁月 提交于 2019-12-11 00:07:12
问题 Is it possible to create buttons on the view using only Elements API? var root = new RootElement ("LoginScreen"){ new Section ("Enter your credentials") { new EntryElement ("Username", "Your user name", "user1"), new EntryElement ("Password", "Your password", "", isPassword:true), }, new Section () { new RootElement ("Login"){ //Here should be a button } }, new Section () { new BooleanElement ("Save your credentials", false), }, }; var dv = new MainController (root, true){ Autorotate = true }

MonoTouch.Dialog: Dismissing a Keyboard

半腔热情 提交于 2019-12-10 19:45:29
问题 Using the Reflection API to auto generate a UI. How can I dismiss the keyboard when the user selects a new field, or if they choose a field which generates a new view to pick from. In the later case, when the user returns to the first screen, the old keyboard is still there. 回答1: UIView.EndEditing(bool force); The above will hide the keyboard for you without needing to know who the first responder is. I haven't done much with the reflection API but you should be able to call that on the view

UINavigationController scrolls down on back button click

百般思念 提交于 2019-12-10 17:45:16
问题 I'm working on an iPhone / iPad app with several navigation controllers. When I click a back button of a view while the device is in landscape mode, the previous view scrolls vertically into the screen, instead of scrolling horizontally as usual. Push animations always work horizontally, as it should be. What could be causing this weird problem? Thanks, Adrian 回答1: Are you sure the view controller, you're getting back to, is set to deal with rotation properly ? I had a similar issue using

MonoTouch.Dialog: Update of Text in an Element

牧云@^-^@ 提交于 2019-12-10 10:41:40
问题 Using MonoTouch.Dialog I add StyledStringElement elements. There is a background task that retrieves details that need to update the element.Value Is there a way to force the element to have it's text updated after the element.Value is updated? Ian 回答1: If you want to update this element-by-element then you can use something like: public class MyStyledStringElement { public void SetValueAndUpdate (string value) { Value = value; if (GetContainerTableView () != null) { var root =

Have a dedicated UIViewController for each RootElement in MonoTouch.Dialog?

时间秒杀一切 提交于 2019-12-09 03:37:52
问题 It's easy to create a multi-level menu structure using nested RootElements in MonoTouch.Dialog but how would you go about having a specific UIViewController manage each root instead? The reason I want each RootElement to have it's own UIViewController is because I want to be able to easily control things like background image and toggling the NavigationBar from screen to screen and doing so is trival from within a UIViewController . 回答1: I think you're looking for this: public RootElement

MvvmCross Bindable MonoTouch.Dialog RadioElement

此生再无相见时 提交于 2019-12-08 08:42:53
问题 I am attempting to create a bindable RadioElement to use in a MonoTouch.Dialog implementation in MvvmCross, and following the pattern in https://github.com/MvvmCross/MvvmCross-Tutorials/tree/master/DialogExamples/DialogExamples.Touch/BindableElements (as suggested in MvvmCross Monotouch.Dialog binding data to a table), I created the following class: public class MvxBindableRadioElement : RadioElement, IBindableElement { public IMvxBindingContext BindingContext { get; set; } public