public override void LayoutSubviews() { base.LayoutSubviews(); _SelectionView.SetLocation(0, 0); _SelectionView.SetSize((float)_SelectionWidth, (float)Bounds.Height); _WebView.SetLocation((float)_SelectionView.Frame.Right, (float)_ButtonHeight + _ButtonMargin * 2.0f); _WebView.SetSize((float)Bounds.Width - (float)_SelectionView.Frame.Right, (float)Bounds.Height - _ButtonMargin * 2.0f); _EmailButton.SetSize(100f, _ButtonHeight); _EmailButton.SetLocation((float)Bounds.Width - (float)_EmailButton.Bounds.Width - _ButtonMargin, _ButtonMargin); //size selection view items _LevelTab.SetLocation(14f, 10f); _LevelTab.SetWidth(((float)_SelectionView.Bounds.Width - 28f) / 2.0f); _LevelTab.SetHeight(40f); _ItemsTab.SetLocation((float)_LevelTab.Frame.Right, 10f); _ItemsTab.SetSize(_LevelTab.Bounds.Size); _GenerateButton.SetSize((float)_SelectionView.Bounds.Width - 10f, 40f); _GenerateButton.SetLocation(5f, (float)_SelectionView.Bounds.Height - 50f); _GenerateButton.ImageEdgeInsets = new UIEdgeInsets(0, 0, 0, 10); _ItemsView.SetLocation(5f, (float)_ItemsTab.Frame.Bottom); _ItemsView.SetSize((float)_SelectionView.Bounds.Width - 10.0f, (float)_GenerateButton.Frame.Top - (float)_ItemsView.Frame.Top - 5.0f); _LevelView.Frame = _ItemsView.Frame; //size level view items CGRect levelRect = _LevelView.Bounds.Size.OriginRect(); CGRect buttonRect = levelRect; buttonRect.Inflate(-_ButtonMargin, 0); buttonRect.Y = _ButtonMargin; buttonRect.Height = _ButtonHeight; foreach (var v in new GradientButton[] { _LevelButton, _CoinButton, _GoodsButton, _ItemsButton }) { v.Frame = buttonRect; buttonRect.Y += buttonRect.Height + _ButtonMargin; } //size item view items buttonRect = _ItemsView.Bounds.Size.OriginRect(); buttonRect.Inflate(-_ButtonMargin, 0); buttonRect.Y = _ButtonMargin; buttonRect.Height = _ButtonHeight; foreach (var v in new GradientButton[] { _CountButton, _ChartLevelButton }) { v.Frame = buttonRect; buttonRect.Y += buttonRect.Height + _ButtonMargin; } foreach (var v in _ItemCheckButtons) { v.Frame = buttonRect; buttonRect.Y += buttonRect.Height + _ButtonMargin; } buttonRect.Height = buttonRect.Height * 2.0f; buttonRect.Width = buttonRect.Width / 2.0f - _ButtonMargin; _SelectAllButton.Frame = buttonRect; buttonRect.X += buttonRect.Width + _ButtonMargin; _UnselectAllButton.Frame = buttonRect; }