migueldeicaza / monotouch.dialog Goto Github PK
View Code? Open in Web Editor NEWTools to simplify creating dialogs with the user using MonoTouch
License: MIT License
Tools to simplify creating dialogs with the user using MonoTouch
License: MIT License
For some reason the only way to change the field caption for RadioSelection element is to change IEnumerable field name in the class.
Neither Caption attribute nor RadioSelection attribute seem have any effect on field caption.
What is wrong?
Thanks
Slava
Hi Miguel. I found a bug in EntryElement today. I've patched in my fork, and posted a patch for you as well. Please find it at https://gist.github.com/878651
Thanks
Warren
For some reason this event is getting triggered when navigating around my web site (nc-software.com) so I commented it out:
// web.LoadError += ....
Hi,
Im a new developer to the iphone and to github so please be patient with me. Ive been using Monotouch and MT.D (an awesome combination btw) for a couple of months on a project and think I might have found a bug. Or an Error between Keyboard and Chair (EBKC) :-)
I have a data entry form consisting of three sections, each with their own collection of entry elements. The last section is off the screen when the view is shown and when it scrolls into view, the EntryElements are drawn incorrectly; the UITextField appears to have its dimensions calculated incorrectly.
This is a pretty obscure bug and ive had trouble tracking it down or even producing a workable demo but here is demo code below. Comment out the line indicated (to prevent section 2 from displaying) and section 3 works fine. Leave the line in and section 3 doesnt work properly.
Any ideas? is this EBKC or a genuine bug? Ive looked through Elements.cs and theres a function to calculate the width that gets fired when the section is appearing but to me the data and results from that calculation seem OK, maybe this correct calculation is being ignored?
Jas.
(code follows)
root=new RootElement("Edit Job");
Section customerSection=new Section("Customer Details");
EntryElement CustomerTitle=new EntryElement("Title","Mr/Miss/Mrs/Dr/Etc","Mr");
customerSection.Add (CustomerTitle);
EntryElement CustomerForename=new EntryElement("Forename","","Fred");
customerSection.Add (CustomerForename);
EntryElement CustomerSurname=new EntryElement("Surname","","Flintstone");
customerSection.Add (CustomerSurname);
EntryElement CustomerAddress1=new EntryElement("Address","","1 Rock Way");
customerSection.Add (CustomerAddress1);
EntryElement CustomerAddress2=new EntryElement("","","Bedrock");
customerSection.Add (CustomerAddress2);
EntryElement CustomerAddress3=new EntryElement("","","");
customerSection.Add (CustomerAddress3);
EntryElement CustomerAddress4=new EntryElement("","","");
customerSection.Add (CustomerAddress4);
EntryElement CustomerPostCode=new EntryElement("Post Code","","D1N0");
customerSection.Add (CustomerPostCode);
root.Add (customerSection);
Section contactInformation=new Section("Contact Information");
EntryElement CustomerPhoneHome=new EntryElement("Home","","01234567890");
contactInformation.Add (CustomerPhoneHome);
EntryElement CustomerPhoneWork=new EntryElement("Work","","");
contactInformation.Add (CustomerPhoneWork);
EntryElement CustomerPhoneMobile=new EntryElement("Mobile","","");
contactInformation.Add (CustomerPhoneMobile);
EntryElement CustomerFax=new EntryElement("Fax","","");
contactInformation.Add (CustomerFax);
EntryElement CustomerEmail=new EntryElement("Email","","");
contactInformation.Add (CustomerEmail);
root.Add (contactInformation); // <---Comment out this line and the vehicle information section works.
Section vehicleInformation=new Section("Vehicle Information");
EntryElement VehicleTagNo=new EntryElement("Key Tag No","","0");
vehicleInformation.Add (VehicleTagNo);
EntryElement VehicleModel=new EntryElement("Model","","Boxster Sleeper model 1");
vehicleInformation.Add (VehicleModel);
EntryElement VehicleRegNo=new EntryElement("Reg No","","AB12CDE");
vehicleInformation.Add (VehicleRegNo);
EntryElement VehicleVINNo=new EntryElement("VIN No","","SALLMA4DW23AB123456");
vehicleInformation.Add (VehicleVINNo);
root.Add (vehicleInformation);
DialogViewController dvc=new DialogViewController(root);
dvc.Autorotate=true;
dvc.Style=UITableViewStyle.Plain;
Navigation.PushViewController (dvc,true);
Hi,
I ran into this exception when using one of your examples, showing to add a radiogroup into a rootelement.
This is the code being used:
var root = new RootElement("New Activity"){
new Section(){
new RootElement("Activitytype", new RadioGroup("activityType", 0){
new Section()
{
new RadioElement("Phone conversation", "activityType"),
new RadioElement("Meeting", "activityType"),
new RadioElement("Task", "activityType"),
new RadioElement("Note", "activityType"),
new RadioElement("Other", "activityType")
}
})
}
};
Please let me know how to fix this problem, i tried looking into it's source, but I couldn't find a quick solution.
Thanks, Jeroen
It works fine on the iOS 4 simulator and on non-iPhone 4 devices that don't have the retina display, but the blue text from the UITableViewCellStyle.Default1 style does not display with the TextLabel font size set to 20.
I resolved it by setting the TextLabel.Font = BoldSystemFontOfSize(19);
Please make the "Selected" field of the RadioGroup class a virtual property in order to allow for subclasses to take action when the value changes.
Rotate the iPad and check the date and time pickers
Issue 1: Picker sizes and positions are different for different orientations
Select a date or time field and then change date or time and click back navigation button
Issue 2: Does not update the field on the main page.
[Tracked this down to the ViewWillDisappear method of MyViewController not being called]
Thx,
Ash
when instantiated with for example:
var myDialog = new DialogViewController(UITableViewStyle.Plain, new RootElement(null));
the table is displayed as "grouped", i.e. the parameter is ignored.
The reason for that is that the parameter is passed to the base classes (UITableViewController) c'tor, BUT the own (public) member "UITableViewStyle Style", which is used by LoadView's call to "MakeTableView", is not updated accordingly!
So to fix this, simply add the line
this.Style = style;
at the beginning of the two c'tors "public DialogViewController(UITableViewStyle style, RootElement root)" and "public DialogViewController(UITableViewStyle style, RootElement root, bool pushing)".
Hi Miguel,
Today I stumbled upon a issue with retrieving the value's from the EntryElements and for some unknown reason the ValueChanged event does not fire when editing ends on a EntryElement.
Possible workaround for me is to change the ValueChanged event to the EditingChanged event. This event always fires and updates the Value whenever something happens to the UITextField.
After googling I found a Obj-C coder with the exact same problem, so I think it's in Apple's SDK but maybe you should check it...
Thanks..
Hi Miguel. I've created a patch to fix the issue here. https://gist.github.com/901027
Thanks Warren.
sample test case available at:
ftp://jbserver.homeip.net/XibTestCase.zip
Hi Guys,
Is it possible to move the UISwitch in the boolean element to the AccessoryView rather positioning it directly within the cell.
Kind Regards,
Tarek
I built this sample and when i use the simulator, I see the login button (clicking it give a protocol error) but on the real phone, the button is not shown?
I'm using Xcode 3.2.6 and iOS 4.3
Is this a known problem?
When setting the SDK option to 4.3 I don't see the Login button in the simulator either???
I built this sample and when i use the simulator, I see the login button (clicking it give a protocol error) but on the real phone, the button is not shown?
I'm using Xcode 3.2.6 and iOS 4.3
Is this a known problem?
I've just downloaded the latest MonoTouch.Dialog project and loaded it in MonoDevelop 2.8. I've not changed the project in any way (I've made a clean install), but it doesn't run. It compiles successfully under monotouch 5.0, but then it crashes with this message:
2011-10-28 16:07:22.491 Sample[1262:1507] Applications are expected to have a root view controller at the end of application launch
As I need to use data binding, I have to use the reflection system. My first item in the class is a RadioSelectionAttribute which uses a List. I then have three other elements which are Entry and Date attributes. Regardless, the RadioSelectionAttribute ends up at the bottom of the section.
FYI
I've been experimenting with creating data-entry form using dialogs. Many aspects are covered by the current version of Dialogs. And many thanks to Miquel for making our lives easier. But stuff like DatePickers on ipads does not seem that useful right now.
When choosing a DataTimeElement, it pushes an entire new view instead of using the InputView trick like this one seems to do:
https://gist.github.com/965257
Method GetHeight returns incorrect height for a multiline cell in cases where view width is different from 320 (e.g. in landscape orientation on the iPhone), because it uses a constant value (280) when calling StringSize.
I suggest using "tableView.Bounds.Width - 40" instead.
Adding more then 10 elements of type BooleanImageElement will check/uncheck only first 10 elements.
Ex: On click element 12 will take effect on element 2.
Tested in DemoDates.cs:
BooleanImageElement element;
for (int i = 1; i < 13; i++)
{
element = new BooleanImageElement ("Element " + i+"a", true, favorited, favorite);
imageSection.Add (element);
}
In an EntryElement the Changed Event is never called,
because in the Value property you use direct the entry.Text in the get procedure, and not the stored Val!
I now removed the two lines from the value property:
if (entry != null)
val = entry.Text
But it think it's not the best solution, we should also call the Changed Event when the Value is set via Code! But it works for me!
This would enable us to use MD and reuse UI code across the iPhone, Android, WP7 and Web.
In order to get the members in a base settings class to also show up in the Dialog, I had to change line 202 in Reflect.cs from BindingFlags.DeclaredOnly to BindingFlags.FlattenHierarchy*. Are there any bad side effects I should be aware of in doing this?
public class BaseClass
{
[section]
public bool BaseBool;
}
public class DerivedClass : BaseClass
{
[section]
public bool DerivedBool;
}
Of course, I don't have control over ordering, but it seems like the DerivedClass bool comes up first.
*Mil gracias to RobertKozak
When GetSectionTitles is called, it is returning an array of the full title. This causes the aplha index bar to look fat and squished. If you only return the first char of the title, it looks good, even with uneven rows.
string [] GetSectionTitles ()
{
return (from section in Root select section.Caption.Substring(0,1)).ToArray ();
}
I'm trying to create a MapElement that uses MKMapKit.
Everything compiles, but unfortunately when an item is clicked, the MapKit View is displayed but the actual MapView itself is not shown...
The code I have so far, which is in Element.cs is...
public class MapElement : StringElement
{
static NSString mkey = new NSString ("MapElement");
private MKMapView mapView = null;
static MKReverseGeocoder geoCoder = null;
private CLLocationManager locationManager = new CLLocationManager();
public class LocationManagerDelegate : CLLocationManagerDelegate
{
private MapElement container;
public LocationManagerDelegate(MapElement aContainer )
{
container = aContainer;
}
public override void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation)
{
MKCoordinateSpan span = new MKCoordinateSpan(0.2,0.2);
MKCoordinateRegion region = new MKCoordinateRegion(newLocation.Coordinate,span);
container.mapView.SetRegion(region, true);
container.Value = newLocation.Coordinate.Latitude.ToString() + ","+ newLocation.Coordinate.Longitude.ToString();
Console.WriteLine("Location updated : " + container.Value);
CLLocationCoordinate2D location2 = new CLLocationCoordinate2D(newLocation.Coordinate.Latitude
,newLocation.Coordinate.Longitude);
geoCoder = new MKReverseGeocoder(location2);
geoCoder.Delegate = new GeoCoderDelegate(container);
geoCoder.Start();
}
public override void Failed (CLLocationManager manager, NSError error)
{
Console.WriteLine("Failed to find location");
base.Failed (manager, error);
}
}
public MapElement (string aCaption, string aValue ) : base (aCaption)
{
Value = aValue;
locationManager.Delegate = new LocationManagerDelegate(this);
locationManager.StartUpdatingLocation();
mapView = CreateMapView();
}
public override UITableViewCell GetCell (UITableView tv)
{
// TODO Value = viewModel.ToString();
UITableViewCell cell = base.GetCell (tv);
if (!ReadOnly)
{
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
}
return cell;
}
public override string Summary ()
{
return Value;
}
class MapViewController : UIViewController
{
private MapElement container;
public MapViewController (MapElement container)
{
this.container = container;
}
public override void ViewWillDisappear (bool animated)
{
base.ViewWillDisappear (animated);
// container.Value = container.locationManager.Location.Coordinate.Longitude.ToString() + "," + container.locationManager.Location.Coordinate.Latitude.ToString();
}
}
public class MapViewDelegate : MKMapViewDelegate
{
private MapElement container;
public MapViewDelegate (MapElement aContainer):base()
{
container = aContainer;
}
/// <summary>
/// When user moves the map, update lat,long text in label
/// </summary>
public override void RegionChanged (MKMapView mapView, bool animated)
{
Console.WriteLine("Region Changed");
// _appd.labelCurrent.Text = "Map Center " + mapView.CenterCoordinate.Latitude + ", " + mapView.CenterCoordinate.Longitude;
}
/// <summary>
/// Seems to work in the Simulator now
/// </summary>
public override MKAnnotationView GetViewForAnnotation (MKMapView mapView, NSObject annotation)
{
Console.WriteLine("Attempt to get view for MKAnnotation "+annotation);
try
{
var anv = mapView.DequeueReusableAnnotation("thislocation");
if (anv == null)
{
Console.WriteLine("creating new MKAnnotationView");
var pinanv = new MKPinAnnotationView(annotation, "thislocation");
pinanv.AnimatesDrop = true;
pinanv.PinColor = MKPinAnnotationColor.Green;
pinanv.CanShowCallout = true;
anv = pinanv;
}
else
{
anv.Annotation = annotation;
}
return anv;
} catch (Exception ex)
{
Console.WriteLine("GetViewForAnnotation Exception : " + ex.Message);
return null;
}
}
}
/// <summary>
/// MKAnnotation is an abstract class (in Objective C I think it's a protocol).
/// Therefore we must create our own implementation of it. Since all the properties
/// are read-only, we have to pass them in via a constructor.
/// </summary>
public class MyAnnotation : MKAnnotation
{
private CLLocationCoordinate2D _coordinate;
private string _title, _subtitle;
public override CLLocationCoordinate2D Coordinate {
get {
return _coordinate;
}
}
public override string Title {
get {
return _title;
}
}
public override string Subtitle {
get {
return _subtitle;
}
}
/// <summary>
/// custom constructor
/// </summary>
public MyAnnotation (CLLocationCoordinate2D coord, string t, string s) : base()
{
_coordinate=coord;
_title=t;
_subtitle=s;
}
}
/// <summary>
/// 'handler' for messages from ReverseGeocoderDelegate; pass in
/// reference to main window via ctor so we can chat with the UI
/// </summary>
public class GeoCoderDelegate : MKReverseGeocoderDelegate
{
MapElement container;
public GeoCoderDelegate (MapElement aContainer)
{
container = aContainer;
}
/// <summary>
/// When the reverse geocode finds a location, it calls this method
/// which puts the placemark on the map as an Annotation
/// </summary>
public override void FoundWithPlacemark (MKReverseGeocoder geocoder, MKPlacemark placemark)
{
string placeMarkText = placemark.SubThoroughfare +" " + placemark.Thoroughfare + " " + placemark.Locality + " " + placemark.AdministrativeArea + " " + placemark.Country;
Console.WriteLine("Found placemark in " + placemark.Country);
Console.WriteLine(placeMarkText);
container.Value = placeMarkText;
try
{
container.mapView.AddAnnotationObject(placemark);
}
catch (Exception ex)
{
Console.WriteLine("Error adding Annotation Object : " + ex.Message);
}
}
/// <summary>
/// Exposed by MonoTouch, just override to make it work
/// </summary>
public override void FailedWithError (MKReverseGeocoder gc, NSError error)
{
// _appd.labelPlacemark.Text = "Reverse Geocoder " + error.LocalizedDescription;
Console.WriteLine("Reverse Geocoder failed");
}
}
public virtual MKMapView CreateMapView()
{
var map = new MKMapView()
{
Delegate = new MapViewDelegate(this), // RegionChanged, GetViewForAnnotation,
ZoomEnabled = true,
ScrollEnabled = true,
ShowsUserLocation = true,
MapType = MonoTouch.MapKit.MKMapType.Standard,
UserInteractionEnabled = true,
MultipleTouchEnabled = true,
ClearsContextBeforeDrawing = true,
ClipsToBounds = true,
AutosizesSubviews = true,
};
return map;
}
static RectangleF PickerFrameWithSize (SizeF size)
{
var screenRect = UIScreen.MainScreen.ApplicationFrame;
return new RectangleF (0f, screenRect.Height - 84f - size.Height, size.Width, size.Height);
}
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
{
if (!ReadOnly)
{
var vc = new MapViewController(this);
// mapView = CreateMapView();
mapView.Frame = PickerFrameWithSize (mapView.SizeThatFits (SizeF.Empty));
vc.NavigationItem.Title = Caption;
// vc.View.BackgroundColor = UIColor.Black;
vc.View.AddSubview (mapView);
dvc.ActivateController(vc);
}
}
protected override void Dispose (bool disposing)
{
if (disposing)
{
mapView.Dispose ();
mapView = null;
}
}
}
The mapView is being added to the ActiveController stack and it is being displayed/animated on, but the actual MapView itself is never shown. Any ideas?
Anyway, does anyone see where I might have gone wrong, or why the MkView is not appearing.
Thanks,
D.
the problem is to call the Fetch method () and have a datetime variable does not return the time assigned by the user. the value returned is different. I need help on this problem.
The RectangleF bounds in "override float Height" for OwnerDrawnElement comes from TableView.Bounds. While RectangleF bounds in Draw comes from the object which holds the Section. If the TableView is not Plain, these two bounds have different widths (e.g., 320 vs 300) and the result is that the Height will be calculated wrong if you are calculating word wrap. ODE should give the right width, but I'm not sure how to compute the Grouped margin size (which will surely vary over time).
Also, in Grouped mode the rounded edges are lost in ODE.
Elements.cs: Some elements don't align vertically properly such as the UISwitch. I suggest moving the code below the area where the Cell is created and use Cell.ContentView.Bounds.Height / 2 - HeightOfControlHere / 2
When invoking the DemoDynamic code from within a ViewController that gains access to the AppData from UIApplication.SharedApplication.Delegate an error is thrown when the second level element is Tapped.
Unhandled Exception: System.InvalidProgramException: Invalid IL code in (wrapper delegate-invoke) MonoTouch.Foundation.NSAction:invoke_void__this__ (): IL_004a: ldarg.1
at MonoTouch.Dialog.StringElement.Selected (MonoTouch.Dialog.DialogViewController dvc, MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) [0x0000b] in /Users/DetroitPro/Projects/IMap/Assets/MonoTouchDialog/MonoTouch.Dialog/Elements.cs:350
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
{
if (Tapped != null)
Tapped();
tableView.DeselectRow (indexPath, true);
}
This can be done simply be making the 'entry' property public (and addressing casing). The reason for this is so that we can determine if the UITextView is the first responder. I modified the source locally to support this because I have a scanning application that scans in to the first responder. There is no way of determining if the EntryElement is the first responder or not without modifying the code.
Also, I need to be able to resign the first responder after I collect my scanned barcode value and updated the value of the entry element. I could see other uses for this as well.
in the latest version you have excluded the code entry.Ended += delegate {Value = entry.Text;}; and it appears as though it prevents the Entry Element from returning the value.
I am using this code and it is working fine.
I've just taken the latest code and when the dialog is displayed it no longer shows the existing value. I've started to debug it and the value of the element is correctly set. Also I have a Save button in the nav that calls fetch. If you have two text entry elements; enter value in one -> press save -> press keyboard next is crashes because, for a reason I've not determined, the entry element is now null and a call to entry.Text in the fetch code crashes
Hi Miguel,
It would be nice to add a AccessoryAttribute for the StringElement which enables the user to display any kind of accessory on the cell. This would come in handy at for instance a "StringElement like" button, so the user can see it's going to interact with a new view.
I already adjusted my local copy of your source, quite simple to do and it could be a great addition to this already great tool. It saved me lots of hours already!
Is there a way to create an OnTap string within the Elements API syntax?
Thanks,
Daniel
When tapping NEXT on the keyboard when there are more than one EntryElement items the focus will go to the LAST item in the section.
Go to UITableViewCell GetCell in the EntryElement class
You just need to break out of the foreach and stop the iteration as it's setting the last item.
FYI
I've a problem with a owner Drawn element, the it is not redrawn when i reloaldata in the view. I've fixed this by adding a Method NeedsRedraw in OwnerDrawn Element.
This I can call then in my property.
public void NeedRedraw()
{
if (cell != null)
cell.view.Update()
}
and i changed the Property view of the OwnerDrawnCell to public.
and the OwnerDrawnCell is not declared in GetCell Procedure, it's declared in the calss.
Or is there a better way to do this.
Add htmlattribute to create html element via reflection, then change Populate to;
Element element = null;
if (mType == typeof (string)){
PasswordAttribute pa = null;
EntryAttribute ea = null;
NSAction invoke = null;
bool multi = false;
HtmlAttribute html = null;
foreach (object attr in attrs){
if (attr is PasswordAttribute)
pa = attr as PasswordAttribute;
else if (attr is EntryAttribute)
ea = attr as EntryAttribute;
else if (attr is HtmlAttribute)
html = attr as HtmlAttribute;
else if (attr is MultilineAttribute)
multi = true;
if (attr is OnTapAttribute){
string mname = ((OnTapAttribute) attr).Method;
if (callbacks == null){
throw new Exception ("Your class contains [OnTap] attributes, but you passed a null object for `context' in the constructor");
}
var method = callbacks.GetType ().GetMethod (mname);
if (method == null)
throw new Exception ("Did not find method " + mname);
invoke = delegate {
method.Invoke (method.IsStatic ? null : callbacks, new object [0]);
};
}
}
string value = (string) GetValue (mi, o);
if (pa != null)
element = new EntryElement (caption, pa.Placeholder, value, true);
else if (ea != null)
element = new EntryElement (caption, ea.Placeholder, value);
else if (multi)
element = new MultilineElement (caption, value);
else if (html != null)
element = new HtmlElement(caption, value);
The application crashes
if a RadioElement is selected but
the current selected RadioElement is not visible on the screen.
I mad this fix in the file elements.cs.
public class RadioElement : StringElement {......
public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
{
RootElement root = (RootElement)Parent.Parent;
if (RadioIdx != root.RadioSelected) {
var cell = tableView.CellAt (root.PathForRadio (root.RadioSelected));
fix: if (cell != null) {
cell.Accessory = UITableViewCellAccessory.None;
}
cell = tableView.CellAt (indexPath);
fix?: if (cell != null) {
cell.Accessory = UITableViewCellAccessory.Checkmark;
root.RadioSelected = RadioIdx;
}
}
base.Selected (dvc, tableView, indexPath);
}
Show the loading icon (the round circle of spokes) when a web page is loading using the HTMLElement
Take a look at the Dynamically loaded data sample, look at the huge gap between the first section footer text and the next section. I fixed this by returning the StringSize of the footer text, etc.
FYI
I was using the same EntryElement twice in a dialog (second time in a nested root) - but it revealed that this class has an issue if Dispose is called twice (because the "entry" field is nulled the first time)
I have a save button which calls bindingContext.Fetch, however if I'm editing a textbox and press save it returns the original value of the text box and not the current value.
Also if I clear the value of a textbox then it doesn't appear to null or empty the value after the fetch, it still has the previous value in it
Review the DialogViewController constructors and you'll see that you're not setting this.Style = style
FYI
Need support for the new UIView element as an attribute for reflection based usage.
When using EntryElement ("", "Some text", "value"),
the value does not show.
Editing to EntryElement ("a", "Some text", "value"),
the value shows.
In DialogViewController.cs when you click search cancel button it calls FinishSearch(). This does not properly reset the table. I believe it needs to call this.ReloadData(); as a final step to the FinishSearch() method.
Using the code supplied:
public override void Draw (RectangleF bounds, CGContext context, UIView view)
{
UIColor.White.SetFill();
context.FillRect(bounds);
UIColor.Black.SetColor();
view.DrawString(this.Text, new RectangleF(10, 15, bounds.Width - 20, bounds.Height - 30), UIFont.BoldSystemFontOfSize(14.0f), UILineBreakMode.TailTruncation);
}
the corners seems to be drawn incorrect: http://dl.dropbox.com/u/2600860/Screenshot1.png
Is there a way to create a dynamic RadioGroup object using the Reflection API?
Thanks,
Daniel
In the HtmlElement I noticed the UIWebView isn't filling the available view space. I corrected this in my code using:
new UIWebView ( new RectangleF(0, 0, dvc.View.Frame.Width, dvc.NavigationController.View.Frame.Height)
I'm trying to set the Root property from the DialogViewControl's ViewDidLoad method. When I do this the Back button on the navigation bar doe snot appear.
Here is the Code;
public class HomePageViewController : DialogViewController
{
public HomePageViewController ( RootElement root) : base( root )
{
}
public override void ViewDidLoad ()
{
Title = "test";
Root = new RootElement("Test");
}
}
called as follows
var dv = new HomePageViewController(null) {
Autorotate = true
};
navigation.PushViewController (dv, true);
I'm trying to do this because I want to build up the view from within the DialogViewController rather than build it in the calling controller. What am I missing here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.