Disable EditText context menu

I have made this code for EditText, and it worked fine for such an issue. try { edtName.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { edtName.setSelection(0); } }); edtName.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { return true; } }); edtName.setCustomSelectionActionModeCallback(new ActionMode.Callback() { @Override public boolean onCreateActionMode(ActionMode actionMode, Menu menu) { return false; … Read more

How do you make a vertical text UILabel and UITextView for iOS in Swift?

Edit: This is how I finally did it. Here’s a very basic implementation in my GitHub: Vertical-Text-iOS. Nothing fancy, but it works. Finally I had to mix TextKit and image processing. Take a look at the code. It involves: Subclassing NSTextContainer to get the right text dimensions. Creating a custom UIView to render the text … Read more

Working with Unicode code points in Swift

Updated for Swift 3 String and Character For almost everyone in the future who visits this question, String and Character will be the answer for you. Set Unicode values directly in code: var str: String = “I want to visit 北京, Москва, मुंबई, القاهرة, and 서울시. 😊” var character: Character = “🌍” Use hexadecimal to … Read more