Welcome
I want to convert this code to B4A
I want to convert this code to B4A
B4X:
Sub SingleLineCS (cs As CSBuilder) As CSBuilder
Dim ParaStyle As NativeObject
ParaStyle = ParaStyle.Initialize("NSMutableParagraphStyle").RunMethod("alloc",Null).RunMethod("init",Null)
ParaStyle.SetField("alignment",2)
ParaStyle.SetField("lineBreakMode", 4)
cs.As(NativeObject).RunMethod("addAttribute:value:range:", Array("NSParagraphStyle", ParaStyle, cs.As(NativeObject).MakeRange(0, cs.Length)))
Return cs
End Sub