IOS- use setting bundle in app ? - ios

My app need an inside setting view, and I want to create a custom view with setting bundle.It suggests two way:
use a table view and UISwitch,UISlider...
use some open source framework like InAppSettingsKit.
Which is better? Or is there a better way for this solution?

I suggest you use CoreData to saving setting value,than you can use custom componts

Settings page of the app have a lot of limitations, you cannot use custom layouts, controls, only that which are available in the Settings.bundle. So you can use only them and construct that page in "manual mode" or use that library which you have mentioned in your question. The result will be same, it is totally opinion based and which is easier for you would be the right way

Related

How To Create a Standalone Swift SDK

I would like to create a SDK to use without iOS or Xcode.
Let me explain. I would like to use Swift language to create a framework with which to develop front-end. In few words with this framework I would like create html pages for web and substitute HTML, CSS and javascript with swift. The idea get from what Apple does with iOS. If you look how is made a xib or storyboard you can see xml file. I would like to do the same thing or take the idea and applicate for the web.
To do this I need to create an SDK that is not connected to iOS but that I can use in any IDE like VSCode or similar or also in a my own IDE created by me.
An other thing that could help you to understand what I mean is Javascript. In javascript there is a command createElement that let you to create an element, adding class, attribute and, yes, style. But create UI in this way, you understand well that is very hard. So, I Would like create a framework in iOS style, to create frontend in simpler and easier way.
I would like create create this framework (if it's possible) in Xcode and I don't want have any interference by iOS.
So, have you any suggests about how to start?
thank you
XIB layout is constraint-based, which means you describe your view hierarchy and constraints, and autolayout system does the layout for you every time according to constraints you've provided. Technically, inside it converts constraints to a system of linear equations and solves it in run-time, thus calculating frames for every UIView. And .xib file is just an XML with all the views, their properties and constraints. (that's a bit simplified, but you've got the idea)
HTML layout is totally different: HTML is a declarative way to describe elements on a page, i.e you describe every element with tags, and every tag (or its parent, or CSS file) already contains all necessary information about its positioning and appearance, so browser just parses and renders a page accordingly.
Theoretically, you could've reinvented a web browser: write your HTML parser, then write UI to somehow render it, and add feature to alter HTML tags by moving the page elements with mouse. But that would've taken a lot of time and effort :)
There are many website constructors on WWW, which allow you to build simple sites only with drag-and-drop (no coding needed). Also, you can inspect element in your browser, and then change some attributes of some element right in the debug window, and see changes in realtime.
P.S Im not a web/frontend developer, but I suppose that IDE's popular among frontenders already have some features or plugins that allow them to render HTML/CSS code and see changes in realtime, just like browser's debug menu.

How I can build 'How to use this app' tutorial inside my iOS app?

I built a new iOS app,
After I ended it they asked me to make a self inside app tutorial explaining How to use this app !!
They mean something like the tutorials you view them on some famous apps,
Like: To add new item: press here, and they put an arrow signing to the add button.
So I'm wondering if there is any solution or idea I can start with it to make this tutorial .
Thanks in advance.
Depends on what you want.
You could show a video as #wasted suggests.
Another way of solving this is to use a UIPageViewController which embeds other simple UIViewControllers containing images and text explaining what you app does. An example of how to do that is shown [here] (http://www.appcoda.com/uipageviewcontroller-tutorial-intro/)
You can also find several frameworks made for this purpose, here are some of them:
https://github.com/vsouza/awesome-ios
https://github.com/ephread/Instructions
https://github.com/ariok/BWWalkthrough
https://github.com/ruipfcosta/SwiftyWalkthrough
Hope that gives you something to work with.

How to share a bunch of files at once in iOS

I need to share some data, e.g. two images, to other apps like dropbox or gdrive.
Some recommend using UIActivityViewController but there's no option for mimetypes and other recommend using UIDocumentInteractionController but this seems only be suitable for single files...
Does anybody know about the right way and/or can provide some example in swift?
Edit:
UIActivityViewController seems to be the right way and NSURL.fileURLWithPath(filePath) provides the content.
But what about files stored on a server? Those must be downloaded at some point during share process (e.g. after choosing dropbox). How can I achieve this? I tried with a customized UIActivityItemSource with no luck.
Thanks.
Take a look at the Apple doc for UIPasteboard.
Using UIActivityViewController is the right way.
I had to provide my files wrapped in a subclass of UIActivityItemProvider.
Overriding item()-function for downloading and providing my binary content.

How to create a new "templates" category on Xcode 4 and use my own file templates there?

I would like to start using my own templates for iOS applications. I don't want any significant changes, but simpler things like
add/remove some boilerplate code
add some pragma mark sections
hardcode my company's name and some comments for every file
change the indentation
etc etc etc
The idea is that we will share these templates when we create apps, but at the same time we want to keep the default template files that Xcode 4 already provides. So, in the following screenshot, how can I add a "CompanyName Application" section that contains exactly the same templates (Navigation-based, View-based etc), but with my own changes?
I found that I can add a folder under /Developer/Library/Xcode/Templates/ or /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/ but I'm a bit confused with what do I need to do exactly. I would really appreciate it if you could help me with that, as I have already messed up my folders twice with no luck. Thanks!
This blog post by borealkiss has detailed instructions. For starters:
If you add your own templates, the place you should use is under the following path:
~/Library/Developer/Xcode/Templates/
The problem is that it is quite hard to create a custom template.
For example, to copy and paste the
built-in template to your place will
not show up the template on Xcode 4
until you manually change its
identifier in TemplateInfo.plist.
I just found this article from Bob McCune "Creating Custom Xcode 4 File Templates" that is exactly what I needed, so I put it here for reference.

Can we create the controls using Scriptaculous.js and prototype.js or this library is for giving the effects on control

I am New for the technology.
I want to know that "Can we create the controls using scriptaculous.js and prototype.js or this library is for giving the effects,Drag n Drop,Auto Completer?." Because i have seen in dojo.js they have their own controls as we create in dojo.(Button,CheckBox etc...)
I want to know about which is the best library to used for Effects,Animation etc.
(scriptaculous.js,prototype.js vs dojo.js vs jQuery vs YUI).
Please comment on it.
Regards,
Mauunusanghi
Yes, you can create controls using prototype. You'd typically be using Element.insert. You can also use all scriptaculous/prototype functions on the newly created element.
The "which is best" question is answered elsewhere on SO.

Resources