Skip to content

Commit 14ecacb

Browse files
author
Nicolas VERINAUD
committed
Update iOS ReactiveCollectionReusableView and ReactiveControl : add .ctor(CGRect) for Unified api.
1 parent 8b94964 commit 14ecacb

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

ReactiveUI/Cocoa/ReactiveCollectionReusableView.cs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
using System;
2-
using ReactiveUI;
3-
using System.Runtime.Serialization;
2+
using System.Collections.Generic;
43
using System.ComponentModel;
4+
using System.Diagnostics.Contracts;
5+
using System.Drawing;
6+
using System.Linq;
57
using System.Reactive;
6-
using System.Reflection;
7-
using System.Reactive.Subjects;
88
using System.Reactive.Concurrency;
9-
using System.Linq;
10-
using System.Threading;
119
using System.Reactive.Disposables;
12-
using System.Diagnostics.Contracts;
10+
using System.Reactive.Subjects;
11+
using System.Reflection;
1312
using System.Runtime.CompilerServices;
14-
using System.Collections.Generic;
15-
using System.Drawing;
13+
using System.Runtime.Serialization;
14+
using System.Threading;
15+
using ReactiveUI;
1616
using Splat;
1717

1818
#if UNIFIED
19+
using CoreGraphics;
1920
using Foundation;
2021
using UIKit;
2122
#else
@@ -28,8 +29,13 @@ namespace ReactiveUI
2829
public abstract class ReactiveCollectionReusableView : UICollectionReusableView,
2930
IReactiveNotifyPropertyChanged<ReactiveCollectionReusableView>, IHandleObservableErrors, IReactiveObject, ICanActivate
3031
{
31-
protected ReactiveCollectionReusableView() : base() { setupRxObj(); }
32+
#if UNIFIED
33+
protected ReactiveCollectionReusableView(CGRect frame) : base(frame) { setupRxObj(); }
34+
#else
3235
protected ReactiveCollectionReusableView(RectangleF frame) : base(frame) { setupRxObj(); }
36+
#endif
37+
38+
protected ReactiveCollectionReusableView() : base() { setupRxObj(); }
3339
protected ReactiveCollectionReusableView(IntPtr handle) : base(handle) { setupRxObj(); }
3440
protected ReactiveCollectionReusableView(NSObjectFlag t) : base(t) { setupRxObj(); }
3541
protected ReactiveCollectionReusableView(NSCoder coder) : base(coder) { setupRxObj(); }

ReactiveUI/Cocoa/ReactiveControl.cs

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Reactive.Subjects;
77

88
#if UNIFIED
9+
using CoreGraphics;
910
using Foundation;
1011
using UIKit;
1112
#elif UIKIT
@@ -21,25 +22,16 @@ namespace ReactiveUI
2122
{
2223
public class ReactiveControl : UIControl, IReactiveNotifyPropertyChanged<ReactiveControl>, IHandleObservableErrors, IReactiveObject, ICanActivate, ICanForceManualActivation
2324
{
24-
protected ReactiveControl() : base()
25-
{
26-
}
27-
28-
protected ReactiveControl(NSCoder c) : base(c)
29-
{
30-
}
31-
32-
protected ReactiveControl(NSObjectFlag f) : base(f)
33-
{
34-
}
35-
36-
protected ReactiveControl(IntPtr handle) : base(handle)
37-
{
38-
}
25+
#if UNIFIED
26+
protected ReactiveControl(CGRect frame) : base(frame) { }
27+
#else
28+
protected ReactiveControl(RectangleF frame) : base(frame) { }
29+
#endif
3930

40-
protected ReactiveControl(RectangleF size) : base(size)
41-
{
42-
}
31+
protected ReactiveControl() { }
32+
protected ReactiveControl(NSCoder c) : base(c) { }
33+
protected ReactiveControl(NSObjectFlag f) : base(f) { }
34+
protected ReactiveControl(IntPtr handle) : base(handle) { }
4335

4436
public event PropertyChangingEventHandler PropertyChanging {
4537
add { PropertyChangingEventManager.AddHandler(this, value); }

0 commit comments

Comments
 (0)