public override void ViewDidLoad() { base.ViewDidLoad (); Title = "Set Profile Picture"; webView.LoadStarted += LoadStarted; webView.LoadFinished += LoadFinished; webView.ScalesPageToFit = true; hud = new ATMHud(); hud.Center = new System.Drawing.PointF(View.Frame.Width / 2f, 66f); View.AddSubview(hud.View); }
public override void ViewDidLoad() { base.ViewDidLoad(); Title = "Photos"; _dataSource = new DataSource(this, _facebook); TableView.Delegate = new TableDelegate(); TableView.DataSource = _dataSource; _hud = new ATMHud(); View.AddSubview(_hud.View); var backView = new UIView(RectangleF.Empty); backView.BackgroundColor = UIColor.Clear; var table = (UITableView)View; table.BackgroundView = backView; table.SeparatorColor = UIColor.Clear; table.SeparatorStyle = UITableViewCellSeparatorStyle.None; }
public override void LoadView() { base.LoadView (); using(var baseView = new UIView(UIScreen.MainScreen.ApplicationFrame)) { tvdDemo = new UITableView(baseView.Bounds, UITableViewStyle.Grouped); tvdDemo.Source = new HudTableViewSource(this); tvdDemo.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; baseView.AddSubview(tvdDemo); hud = new ATMHud(); // Enabling Blocking - causes the sample app to go a bit mental otherwise. hud.SetBlockUserInteraction(true); hud.UserDidTapHud += (s, e) => { hud.Hide(); }; baseView.AddSubview(hud.View); this.View = baseView; } }
public override void LoadView() { base.LoadView(); using (var baseView = new UIView(UIScreen.MainScreen.ApplicationFrame)) { tvdDemo = new UITableView(baseView.Bounds, UITableViewStyle.Grouped); tvdDemo.Source = new HudTableViewSource(this); tvdDemo.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; baseView.AddSubview(tvdDemo); hud = new ATMHud(); // Enabling Blocking - causes the sample app to go a bit mental otherwise. hud.BlockUserInteraction = false; hud.UserDidTapHud += (s, e) => { hud.Hide(); }; baseView.AddSubview(hud.View); this.View = baseView; } }
void Initialize() { string[] section0 = new [] { "Show with caption only", "Show with caption and activity", "Show with caption and image", "Show activity only", "Play sound on show" }; string[] section1 = new [] { "Show and auto-hide", "Show, update and auto-hide", "Show progress bar", "Show queued HUD" }; string[] section2 = new [] { "Accessory top", "Accessory right", "Accessory bottom", "Accessory left" }; string[] section3 = new [] { "Use fixed size" }; sectionHeaders = new [] { "Basic functions", "Advanced functions", "Accessory positioning", "" }; sectionFooters = new [] { "Tap the HUD to hide it.", "Tap to hide is disabled.", "", ATMHud.BuildInfo() }; cellCaptions = new [] { section0, section1, section2, section3 }; }
public override void ViewDidLoad() { base.ViewDidLoad(); linePickerModel = new LinePickerModel(); lineSelector.Model = linePickerModel; lineSelector.ShowSelectionIndicator = true; lineButton.TouchUpInside += SelectLines; // Profile Picture View may already been set when the Camera closes. if(profilePictureView == null) { profilePictureView = new UIImageView(); } else { // Set up Scroll View again when we have a new picture from the camera. var size = scrollView.Frame.Size; scrollView.ContentSize = profilePictureView.Frame.Size; scrollView.ContentInset = new UIEdgeInsets(size.Height * 0.8f, size.Width * 0.8f, size.Height * 0.8f, size.Width * 0.8f); scrollView.ContentOffset = new PointF(0, 0); } scrollView.AddSubview(profilePictureView); scrollView.MaximumZoomScale = 5f; scrollView.MinimumZoomScale = 0.2f; scrollView.Bounces = false; scrollView.BouncesZoom = false; scrollView.IndicatorStyle = UIScrollViewIndicatorStyle.Black; scrollView.ViewForZoomingInScrollView = (sender) => { return profilePictureView; }; if(profilePictureView.Image == null) LoadImage(UIImage.FromFile("ProfilePicture.jpg")); overlayImage = UIImage.FromFile(string.Format("FacebookOverlay{0}.png", numberOfLines)); facebookOverlay.Image = overlayImage; picker = new UIImagePickerController(); picker.Delegate = new ImagePickerDelegate(this); InitializePhotoButton(); facebookButton.Clicked += (o, e) => LoginToFacebook(true); mirrorButton.Clicked += (o, e) => MirrorImage(); hud = new ATMHud(); View.AddSubview(hud.View); AddCropHelpers(); var contentIdentifiers = new NSMutableSet(); contentIdentifiers.Add(new NSString("ADBannerContentSize320x50")); adView.RequiredContentSizeIdentifiers = contentIdentifiers; adView.Hidden = true; adView.AdLoaded += (o, e) => { adView.Hidden = false; Console.WriteLine("AdLoaded"); }; adView.FailedToReceiveAd += (object o, AdErrorEventArgs e) => { adView.Hidden = true; Console.WriteLine("FailedToReceiveAd: " + e.Error.ToString()); }; }