diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-04-25 13:57:44 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-04-25 15:57:44 -0400 |
commit | 843bc4727a40d6ca67127326facf2333f461da2d (patch) | |
tree | 5467ab3850df7f2368baa1290e983adba27f35d9 /Xamarin.Forms.Platform.iOS | |
parent | 07df05ced2b43446c84d47f4b7a8325abcd0f767 (diff) | |
download | xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.tar.gz xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.tar.bz2 xamarin-forms-843bc4727a40d6ca67127326facf2333f461da2d.zip |
Make core Ticker abstract and public (#116)
* Make core Ticker abstract and public
Make the core Ticker abstract and public so it can be inherited by platform
implementations; remove now-unused parts of original Ticker; add CreateTicker
to IPlatformServices; remove unused CreateTimer methods from IPlatformServices
* Add docs for Ticker
* Remove unnecessary Ticker.Default set
* Move Ticker into Internals
* Update Ticker docs
* Remove old Ticker docs
* Remove commented code
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs | 1 | ||||
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Forms.cs | 26 |
2 files changed, 4 insertions, 23 deletions
diff --git a/Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs b/Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs index 29dd732a..e9102978 100644 --- a/Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs +++ b/Xamarin.Forms.Platform.iOS/CADisplayLinkTicker.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Concurrent; using System.Threading; +using Xamarin.Forms.Internals; #if __UNIFIED__ using UIKit; using CoreAnimation; diff --git a/Xamarin.Forms.Platform.iOS/Forms.cs b/Xamarin.Forms.Platform.iOS/Forms.cs index b0d581c9..eb4100d8 100644 --- a/Xamarin.Forms.Platform.iOS/Forms.cs +++ b/Xamarin.Forms.Platform.iOS/Forms.cs @@ -11,6 +11,7 @@ using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; +using Xamarin.Forms.Internals; #if __UNIFIED__ using UIKit; using CoreFoundation; @@ -86,7 +87,6 @@ namespace Xamarin.Forms Device.PlatformServices = new IOSPlatformServices(); Device.Info = new IOSDeviceInfo(); - Ticker.Default = new CADisplayLinkTicker(); Registrar.RegisterAll(new[] { typeof(ExportRendererAttribute), typeof(ExportCellAttribute), typeof(ExportImageSourceHandlerAttribute) }); Device.Idiom = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? TargetIdiom.Tablet : TargetIdiom.Phone; @@ -173,29 +173,9 @@ namespace Xamarin.Forms NSRunLoop.Main.BeginInvokeOnMainThread(action.Invoke); } - public ITimer CreateTimer(Action<object> callback) + public Ticker CreateTicker() { - return new _Timer(new Timer(o => callback(o))); - } - - public ITimer CreateTimer(Action<object> callback, object state, int dueTime, int period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, long dueTime, long period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, TimeSpan dueTime, TimeSpan period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); - } - - public ITimer CreateTimer(Action<object> callback, object state, uint dueTime, uint period) - { - return new _Timer(new Timer(o => callback(o), state, dueTime, period)); + return new CADisplayLinkTicker(); } public Assembly[] GetAssemblies() |