I am developing non-standard rich text view to display output of some other program. I found it is very easy to do by just adding loads of UITextView into ScrollView, and then set various properties for each label. Like text size, color, transparency etc, etc. Some of them could be clickable buttons.
But now the logical question, how many TextViews iPhone can safely handle?
Of course, I can do some tests myself, (and will I do) but it might not be reliable, maybe someone knows better from experience or some documentation or calculations?
Maybe the question could be generalized to "how many views"? But I am interested mostly in TextViews so far.
I think you don't need to worry about the safe number of UITextView you can use. Because you know the screen of the iPhone is so small. Do you think you need so many UITextView on one screen that the iOS even can not handle?
Related
One screen of my application involves displaying a form - asking the user to enter details which can be posted and saved eventually. In my form, I'm asking for the title, date, description, and attach any images. So there are UILabels, UITextFields, UIButtons, and UITextView involved. And they are displayed using interface builder + constraints.
Now as I view this screen on phones ranging from 8 to XR, I notice, for example in the XR, there is a lot of white space not being utilized. I understand the problem is due to my constraints. How do I adapt my constraints to help with this issue? So in the case of a longer screen such as an XR, my UIViews make use of the space provided rather than being bunched on the top half of the screen. I'm still a beginner w/iOS so I'm assuming it has to do something with constraints but not sure. How can I tackle this issue/change my approach when envisioning iOS applications?
Need some expert to enlighten me w/some iOS wisdom!
It's important to understand how autolayout and constraint works. After that you'll just need to create the UI ONCE in most cases and it will be good for all devices.
Since you're new I suggest putting one object(eg: UILabel) at a time and add constraints on it and see if it works before you add another object
Kindly see this link:
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html
and there are a lot of tutorial videos in youtube you can watch.
happy coding
I'm a UX designer working with a handful of developer teams. We're having an issue with what I believe to be a lot of hard coded values for fonts (as well as other things). The end result being that if a user changes their font size on their phone, or if the app is loaded on a smaller phone like a 4 or 5, the whole design breaks.
I am just beginning to read up on it, but it seems that there's a proper way to build screens and handle text so that it adapts to both device size and user font settings without things breaking (like text overlapping, text boxes bumping into each other, or just flat out text sizes not changing/adapting when they should.)
It seems that the new San Francisco font helps somewhat with this, although we have not been able to implement it yet (again, too much hard coded stuff).
I wonder if someone could lay out the proper strategy for handling text at multiple device sizes and user settings. I am assuming it has something to do with Adaptive Layout. I need to be able to go back to the team and intelligently have the conversation.
You will have to use adjustsFontSizeToFitWidth property of UILabel. For details have a look at this.
Ive been looking around to find an answer, but all I can find is related to web scripting, so...
We are testing an app, and it seems that one user had "increased text size (from phone settings)," but the only texts that are actually increased are the cells of tableviews? I don't understand why the text are not increased in any other place (but I thank the coding god), since it is indeed increased in tableviews?
Anyway, can someone help me on how to fix this so that my tableviews hold a static font size?
Probably the developers set defined size for most of the labels. They should use system size to make it work properly.
For an iOS app i am currently working on, I need to manage the controls displayed on the screen based on the type of device the app is running on.
I will try to explain with a theoretical example (the actual numbers used below are not important, what interests me is best method to achieve the desired result).
Example:
In the case of the app in the screenshots, the button that overlaps the UIImageView should not be displayed at all OR displayed in another place on the screen.
So far I've worked with autolayout , but , from what i could figure, there's no way to say to xcode something like: hey, for a class size "Compact Width / Compact Height" , I want you to hide these buttons...but show them for "Regular Width / Compact Height" .
I also did some googling and saw some people talk about using different storyboards based on the device; I am also thinking, I could add/remove buttons dynamically based on the device type , but I think it's not so pleasant to have to add all of the constraints by hand (programatically that is).
So to resume, I would appreciate a suggestion of a 'best' way to do this , best meaning a combination of 'not so hard' + ' not so long'. Also, some code example (or links) would be highly appreciated.
Thank you all in advance !
I think it all depends how sophisticated it gets what you are doing overall. When you look at developer's code for large app projects very little is actually done in interface builder since the apps are so dynamic it's just too much work in IB.
Using multiple storyboards 'sounds' like a good idea, but often isn't. If you want to update/change one, in most cases you then have to change the other ones as well.
What I think is handy:
Use one storyboard (or multiple but for different parts of you app and not parallel ones) and then put in very 'special' cases multiple ViewControllers of the same class for the different size into the single storyboard. That way you won't forget about updating the second (and third) because they are all right there.
I would only use multiple 'parallel' storyboards for apps that support iPhone and iPad and it makes sense to really split them up..
Also:
I would as fas as possible still use just one representation and derive the other 'versions' from that in code. If you build a structured user interface you can then reuse (or just inherit) the code that 'hides' parts of the first viewController in the next. That way your code AND your IB files won't get cluttered.
Also think about internationalisation (if that is part of your future plans), since multiple IB documents and multiple instances of the same viewController layout really don't help for that ;)
Is there any indicator in xcode about the size of table cells and picker cells, so I can work out how big my images need to be in there, how much gap to leave for the edges etc. Just need some kind of guidelines indicator as to where my cursor is on the control I suppose. How do you guys deal with working out layouts?
Thanks (sorry if the question is a bit wooly).
Xcode does not provide any such guidelines to do so, but there are some other software that can be used.
You can use MockApp or omni graffle to design your apps. You can also use photoshop but it might be an over kill if your app is small or low budget or if you dont know how to use it.