Recommendation? New class (xib) or new View in a class [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
This question is in relation to X-code, ios, objective-c
Can anyone kindly suggest what is recommended in terms of having a new class or just additional views within exiting class for each new screen I require.
I understand that each approach has its own pros and cons in terms of flexibility in implementation, but wanted to understand if the approaches make any difference in how the app perform or.. is there a recommended way of doing things.
Thanks a lot in advance
Adding an example, as the question was suggested to be too vague.
If I wanted to add a T&C page to my login screen, what is recommended, should I simply add a 'View' to my login class, or should I create a new class 'T&C' (T&C maybe a very simple example, but I think that kind of gives the idea)

To your general question, the answer is "it depends..."
But for your T&C example, I would create a new view controller to be presented onscreen. Since you may end up needing that T&C content elsewhere in the app (e.g., and About screen), that would be the approach I'd take.

Related

How can I re-create this customized Action Sheet with text field? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to figure out how I can re-create what I believe to be a customized Action Sheet (see photo link below) with a text field and two buttons. I'm relatively new to Swift, so I don't know whether an Action Sheet can be customized to this degree.
It would be helpful if someone could point me to any resources that could help me re-create this. Or if you believe this was created using a framework/library, which specific Cocoapod would be useful for my project. (Note: I am not using SwiftUI, so please exclude that in your recommendations.) Thanks.
Welcome to Stackoverflow. You can literally "re-create" that UI in your storyboard or do it in code. No need for fancy libraries that might get you stuck.
It does not matter if you're new to Swift or not. What you need to have a good grasp of is UIKit.
Here's the only material you need to learn, in my opinion. Autolayout
https://www.raywenderlich.com/811496-auto-layout-tutorial-in-ios-getting-started
Hope this helps.

How should I refactor my app correctly? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to create an app with ability for user to log in via Facebook, Twitter, Google, and LinkedIn. I'm using a single UIViewController and adding more and more code to viewDidLoad method. At this point my controller looks awful and I would like to split the code between associated classes (one for Facebook, and so on). I even thought about using custom views for every social media login button...
What would be the right thing to do?
There are at least two things to split in your case.
Login with different networks. It purely depends on your UI. You might have a separate view (and corresponding class) for each network or a popup.
Split code by applying an architectural pattern (MVC, MVVM, VIPER, etc.)
Here is a nice overview of them:
https://techblog.badoo.com/blog/2016/03/21/ios-architecture-patterns/
Additional change you should do is to introduce a separate bunch of classes to handle log in via social networks. Then in your view controller (or better in a View Model or somewhere else, depending on the design pattern you choose) you call SocialNetworkService.authenticateWithTwitter(email:password)
But remember, these classes have to know nothing about view controller.
I hope my answer gives you a hint in which direction to go.

iOS in App user assistance screens [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Our app involves the use of techniques that have not been used within the target profession before, and as a result, end users will have no comprehension of how to use it. We will be doing webinars to help them get started with it; however, there is a concern that they may need some immediate assistance from the time they download it.
So, we're trying to figure out how best to present this information. While the app itself is mostly self-explanatory, the underlying techniques on how it is to be used require some explanation.
I'm thinking of adding a "help button" on the nav bar at the top of screens where it will be relevant, which would then open a webview to load html containing the necessary help screens.
My questions are:
a) Would this generally be acceptable in terms of the UI?
b) Is there a better way than what I'm suggesting?
TIA
A: No. I think a help button is the wrong way to go about it.
B: Why not display a screen onto of the UI that gives info on how to use the app. This screen only shows the first time the user opens the app. Like a short tutorial?

Does it make sense to show the create button only if there are changes [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We have a simple form for creation of a new Article object and it has few attributes which needs to be populated. Would it make sense to show the create only if any attribute was filled? Are there any rails applications which behave this way
I think it's relatively common to disable the create button until all information has been correctly entered, but be sure to include helpful messages either at the top of the field, next to fields which require editing, or both. You want it to be clear to the user why you've disabled the button.
However, hiding the create button entirely might be confusing. I think there are good reasons to not do that, and I don't recall seeing that in the wild.
It depends on the situation, but I would prefer doing extra validations instead of hiding the show button because it will confuse people. A create button simply tells the purpose of the page.

Best practice for determining necessary controllers for simple ASP.NET MVC site? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm playing with the ASP.NET MVC Framework, trying to create a simple site.
My model is essentially:
-Questions
-Answers
-Categories
Since each Question must belong to a Category and each Answer must belong to a question - is it correct to split 'Category' into it's own controller?
What would be incorrect about creating a controller path of /Question/Category/List?
Also, if I wanted to create a search - do I then create a controller called 'Search' and use like so: /Search/Question/, /Search/Answer/? Or do I use '/Question/Search/'?
Thank you in advance for any insight.
Below is a read regarding grouping controllers
Grouping Conrollers
The above is not directly related to your question but may be useful.
Now regarding your question, I'll take it this way.. (This is just one way)..
My initial take on this...
-for Questions and Category
/Question/Ask
/Question/Edit/{id}
/Question/List
/Question/Search/{criteria}
/Category/Create
/Category/Edit/{id}
/Category/List
-for answer
/Question/Answer/{questionid}
/Question/Answer/Search/
/Question/Answer/List/Group/Question
The other approach is to separate the controller with respect to Admin and Visitor functionality. Put all the admin logic like create/update/ in one controller and split the remaining logic into other controllers. There may be +/- argument to this. But's that's an individuated opinion.
Note:
Category can exist independent of the question
A question is associated with one or more category
An answer belongs to a question and cannot exist independently.
*** The example came out of top of my head and may not be the best practice but may just give some points to ponder. :). Feel free to apply your ideas.

Resources