Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

uitextview text alignment

Swift 5:
let textView = UITextView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
let style = NSMutableParagraphStyle()
style.alignment = .center
let text = NSAttributedString(string: yourtextcontentstring,
                              attributes: [NSParagraphStyleAttributeName:style])
textView.attributedText = text
Comment

PREVIOUS NEXT
Code Example
Swift :: swift remove value dictionary 
Swift :: swiftui font add 
Swift :: string interpolation swift 5 
Swift :: how to bold 1 word swift 
Swift :: Swift Create an Empty Set 
Swift :: remove and element from array firebase swift 5 
Swift :: swiftui tutorial 
Swift :: Swift Markup in Xcode 11 
Swift :: swift show title on navigation bar programmatically 
Swift :: Swift for-in Loop 
Swift :: Swift Loop Over Array 
Swift :: swift enum storyboard 
Swift :: swift array map example 
Swift :: The Swift pod `qr_code_scanner` depends upon `MTBBarcodeScanner`, which does not define modules 
Swift :: Swift Objects 
Swift :: swift apply changes after a word in string 
Swift :: Swift enum With Associated Values 
Swift :: Swift Generic Function 
Swift :: Swift Nested Ternary Operators 
Swift :: swift string interpolation 
Swift :: swift integer 
Swift :: Swift Nested Function with Return Values 
Swift :: how request prefix of string in swift 
Swift :: Javascript Define Swift Class 
Swift :: Swift Deinitialization 
Swift :: swift variable 
Ruby :: devise generate controller 
Ruby :: rails delete link 
Ruby :: rails migration change type of column 
Ruby :: Your Ruby version is 3.0.0, but your Gemfile specified 2.7.4 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =