Skip to content

Commit 49d77d8

Browse files
Bumped CYRTextView
* Copying values from designer.
1 parent 797fedf commit 49d77d8

File tree

14 files changed

+52
-49
lines changed

14 files changed

+52
-49
lines changed

LuaCodeView.iOS.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<copyright>Copyright © Vinicius Jarina 2019</copyright>
1717
<tags>LuaCodeView</tags>
1818
<dependencies>
19-
<dependency id="Codefoco.CYRTextView" version="0.4.2" />
19+
<dependency id="Codefoco.CYRTextView" version="0.4.3" />
2020
</dependencies>
2121
</metadata>
2222
<files>

LuaCodeViewExample/LuaCodeViewExample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<Reference Include="System.Core" />
8888
<Reference Include="Xamarin.iOS" />
8989
<Reference Include="CYRTextView">
90-
<HintPath>..\packages\Codefoco.CYRTextView.0.4.2\lib\xamarinios\CYRTextView.dll</HintPath>
90+
<HintPath>..\packages\Codefoco.CYRTextView.0.4.3\lib\xamarinios\CYRTextView.dll</HintPath>
9191
</Reference>
9292
</ItemGroup>
9393
<ItemGroup>

LuaCodeViewExample/Main.storyboard

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,46 @@
2222
<rect key="frame" x="0.0" y="20" width="414" height="483"/>
2323
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2424
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
25-
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
26-
<fontDescription key="fontDescription" type="system" pointSize="14"/>
27-
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
25+
<string key="text">-- example of for with generator functions
26+
27+
28+
local fibs = {
29+
1,
30+
1,
31+
2,
32+
3,
33+
5,
34+
8,
35+
13,
36+
21,
37+
34,
38+
55,
39+
89,
40+
144,
41+
233,
42+
377,
43+
610,
44+
987,
45+
}
46+
47+
48+
function generatefib (n)
49+
return coroutine.wrap(function ()
50+
local a,b = 1, 1
51+
while a &lt;= n do
52+
coroutine.yield(a)
53+
a, b = b, a+b
54+
end
55+
end)
56+
end
57+
local j = 1
58+
for i in generatefib(1000) do
59+
print(i.."" "".. fibs [j])
60+
assert (i == fibs [j])
61+
j = j + 1
62+
end</string>
63+
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="14"/>
64+
<textInputTraits key="textInputTraits" autocorrectionType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no" spellCheckingType="no"/>
2865
</textView>
2966
</subviews>
3067
</view>

LuaCodeViewExample/ViewController.cs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,45 +15,6 @@ public override void ViewDidLoad()
1515
{
1616
base.ViewDidLoad();
1717

18-
codeView.Text = @"-- example of for with generator functions
19-
20-
21-
local fibs = {
22-
1,
23-
1,
24-
2,
25-
3,
26-
5,
27-
8,
28-
13,
29-
21,
30-
34,
31-
55,
32-
89,
33-
144,
34-
233,
35-
377,
36-
610,
37-
987,
38-
}
39-
40-
41-
function generatefib (n)
42-
return coroutine.wrap(function ()
43-
local a,b = 1, 1
44-
while a <= n do
45-
coroutine.yield(a)
46-
a, b = b, a+b
47-
end
48-
end)
49-
end
50-
local j = 1
51-
for i in generatefib(1000) do
52-
print(i.."" "".. fibs [j])
53-
assert (i == fibs [j])
54-
j = j + 1
55-
end
56-
";
5718
// Perform any additional setup after loading the view, typically from a nib.
5819
}
5920

LuaCodeViewExample/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Codefoco.CYRTextView" version="0.4.2" targetFramework="xamarinios10" />
3+
<package id="Codefoco.CYRTextView" version="0.4.3" targetFramework="xamarinios10" />
44
</packages>

build/XamariniOS/LuaCodeView.iOS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<Reference Include="System.Core" />
4545
<Reference Include="Xamarin.iOS" />
4646
<Reference Include="CYRTextView">
47-
<HintPath>..\..\packages\Codefoco.CYRTextView.0.4.2\lib\xamarinios\CYRTextView.dll</HintPath>
47+
<HintPath>..\..\packages\Codefoco.CYRTextView.0.4.3\lib\xamarinios\CYRTextView.dll</HintPath>
4848
</Reference>
4949
</ItemGroup>
5050
<ItemGroup>

build/XamariniOS/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Codefoco.CYRTextView" version="0.4.2" targetFramework="xamarinios10" />
3+
<package id="Codefoco.CYRTextView" version="0.4.3" targetFramework="xamarinios10" />
44
</packages>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/LuaCodeView.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace LuaCodeViewKit
99
{
1010
[Register("LuaCodeView"), DesignTimeVisible(true)]
11-
public class LuaCodeView : CYRTextView
11+
public class LuaCodeView : CYRTextView, IUITextViewDelegate
1212
{
1313
public LuaCodeView(IntPtr handle) : base(handle)
1414
{
@@ -48,12 +48,17 @@ private void Initilize()
4848
};
4949

5050
Tab = "\t";
51+
Delegate = this;
52+
LineCursorEnabled = false;
5153
}
5254

5355
[Export("awakeAfterUsingCoder:")]
5456
public NSObject AwakeAfterUsingCoder(NSCoder aDecoder)
5557
{
56-
return new LuaCodeView(Frame);
58+
var luaView = new LuaCodeView(Frame);
59+
luaView.CopyProperties(this);
60+
61+
return luaView;
5762
}
5863

5964
string FindPreviousLine(UITextPosition from)

0 commit comments

Comments
 (0)