private void Initialize()
{
AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
BackgroundColor = new UIColor(0.88f, 0.9f, 0.92f, 1);
BackgroundColor = UIColor.Red;
_LastUpdateLabel = new UILabel()
{
Font = UIFont.SystemFontOfSize(13f),
TextColor = new UIColor(0.47f, 0.50f, 0.57f, 1),
ShadowColor = UIColor.White,
ShadowOffset = new SizeF(0, 1),
BackgroundColor = BackgroundColor,
Opaque = true,
TextAlignment = UITextAlignment.Center,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin
};
AddSubview(_LastUpdateLabel);
_StatusLabel = new UILabel()
{
Font = UIFont.BoldSystemFontOfSize(14),
TextColor = new UIColor(0.47f, 0.50f, 0.57f, 1),
ShadowColor = _LastUpdateLabel.ShadowColor,
ShadowOffset = new SizeF(0, 1),
BackgroundColor = BackgroundColor,
Opaque = true,
TextAlignment = UITextAlignment.Center,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin
};
AddSubview(_StatusLabel);
SetStatus(RefreshStatus.PullToReload);
_ArrowView = new UIImageView()
{
ContentMode = UIViewContentMode.ScaleAspectFill,
Image = _ArrowImage,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin
};
_ArrowView.Layer.Transform = CATransform3D.MakeRotation((float) Math.PI, 0, 0, 1);
AddSubview(_ArrowView);
_Activity = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray)
{
HidesWhenStopped = true,
AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin
};
AddSubview(_Activity);
if (NSUserDefaults.StandardUserDefaults[_DefaultSettingsKey] != null)
{
LastUpdate = Convert.ToDateTime(NSUserDefaults.StandardUserDefaults[_DefaultSettingsKey].ToString());
}
else
LastUpdate = DateTime.MinValue;
}
}