Building the CustomImageRenderers
We are going to start with the iOS implementation of the CustomImage
. Inside the Renderers
folder, add a new folder called CustomImage
, add a new file called CustomImageRenderer.cs
, and implement the following:
public class CustomImageRenderer : ViewRenderer<CustomImage, UIView> { #region Private Propertie private readonly string _tag; private ILogger _log; private UIImageView _imageView; private int _systemVersion = Convert.ToInt16 (UIDevice.CurrentDevice.SystemVersion.Split ('.') [0]); #endregion #region Constructors public CustomImageRenderer() { _log = IoC.Resolve<ILogger>(); _tag = string.Format("{0} ", GetType()); } #endregion }
Looking at our private
properties, we have the logging objects again, an integer property to hold the current system version (that is, iOS version...