I made lot's of googling but found no solution :(
Is there any way to change the UITableViewCellStyleSubtitle text alignment?
it seems that you cannot change it,
I also had this same problem, and after a lot of googling i found that writing my own custom cell (that took me 10 minutes) was much more productive that doing further research
So my advice is, drop the search and start coding your own cell with subtitle
Yes, the only way for align-subtitle is to make your own custom cell class.
Related
Xcode 8.3.2
As as newbie, I'm trying to get acquainted with segues, constraints, text fields and Image Views...mainly the design elements. I'm trying to put together a cheesy recipe book of favorite recipes. I wanted to know what's the best approach to display rich text with bold text and bullet points? Labels seem to be my only option but I was wondering if there were other options? Any advice would be appreciated.
ViewController in Storyboard
As much for my approach, during my career I learned that textViews (aka C# RichTextBoxes) can be pretty tricky..
You can go with classical UILabel approach with lines in Interface Builder set to 0 and atrributedText, which contains bullet points:
This is a nice tutorial, but a bit old and would probably do it another way, but I guess for the purposes is fine...
https://wingoodharry.wordpress.com/2016/04/10/bullet-point-list-ios-swift/
I would like to state here, that TextViews are the last option everywhere with text...
Wish happy coding! :)
UILabels are best way to display text, you can use attributedText in UILabels which will enhance your UI. Multiline text is a add on.
Else try using AsyncDisplayKit.
This might be something pretty obvious but I haven't been able to figure it out. I know how to set different sizes for each cell, and spaces between sections using UICollectionViewLayout. What about different spaces for each cell?
To give you a better idea I currently have:
and need it to look like this:
Any suggestions? Thanks in advance
[Edit] Ok the suggested link as possible duplicated solved my specific problem, but did not answer my question. In this case I wanted to center the the last cell. But what if I want the cell to be slightly more right or slightly more left? That's the actual problem I was trying to solve.
I have a tableview which has few textfield and popovers for data entry. I want to represent some of them as mandatory. I can could not figure out how to resent the asterisk. Any help would be appreciated.
I think you could use custom UITableViewCell. This will allow you to put almost anything you want into a cell.
Here is where to start. Also there are tons of examples on the SO and the web.
Been coding for > 20 years, but there's nothing more humbling than learning a new platform :)
Hopefully I'm not missing something silly, but I can't find a similar issue here or elsewhere on the web.
I have a UI that looks correct in Interface Builder,
but at runtime, the text in the UITextView doesn't seem to wrap, and it doesn't seem to use the font that I've chosen in IB.
I even outputted the font in viewDidLoad at runtime, and it says it's using the correct font, but visually it isn't. All fields (regardless of font selected in IB) seem to display using the default font.
Hoping someone can point out what is likely a newbie mistake, or what else I could do to diagnose.
Thanks in advance
A basic functionality I am trying to implement in UITextView.
I have a text (NSString) and I am trying to place in to the text field as a paragraph (indentation). Is it possible? I have seen many links but none of them have an exact answer.
We have a property named textAlignment but it is for left, right or center not indention.
Can anyone suggest how to implement this?
You should consider using a UIWebView if your displayed text has formatting. Using textViews and labels quickly renders the code to complex.
Possible solution in this post - as the first answer suggested, use a UIWebView.