i am trying to display a calendar where different days are colored differently (based on data extracted from a core data stack).
I could not find a calendar UI component in swift? (Why is that, btw?). Is there an easy way to integrate calendar in a view controller + access the cells of the calendar and change their background color, for example?
Thanks!,
Karthik
I take it you are new to swift/ ios development? The short answer is there is no built in UI component because Apple did not make one.
However, that being said, you have several options. Many people have attempted to roll their own and they have their code open sourced. Better yet, they have made the integration of their code to your code very easy.
Ever heard of Cocoapods? If not download, and it should help you. It is a dependency manager that let you add (and remove) 3rd party developer code to your project very easily. Once you have cocoapods installed, you can now add 3rd party code (typically called pods) to your code.
Since youre looking for a UI calendar components, you can find a list to choose from at this link. Just read the site to find out how to add pods to your project. Its very easy.
If for some reason you cant use cocoapods, then try cocoacontrols.com and look for a calendar there. Although the ones there are not as good as the first i suggested they are worth a look.
Related
I am trying to use stripes UI example in my person swift project. I have tried to drag and drop the desired files inside of my project and update my headers and compile sources but I am still getting hit with errors I will leave screenshots below,
and most importantly, I am getting
I was wondering if someone has previously used Stripes BECS example UI in their own personal project and had any idea on why these issues would be popping up.
You need to install Stripe per the documentation, you can't just drag and drop files in to your project: https://stripe.com/docs/mobile/ios/basic#client-side
I'd recommend you try doing a basic example integration in a new project to figure out how the bits work, and then make use of those learnings to integrate it into your application.
I've looked everywhere and no article gives me exactly the solution I'm looking for.
Is there a way to "install" a custom framework into Xcode?
For example, let's say I've created a framework called 'MyAwesomeFramework' which is really reusable (for example contains a lot of useful UIView extensions). Now what I want to do is be able to just create any new project and type import MyAwesomeFramework to use it, instead of having to add the respective Xcode Project to the project I want to use it in.
Apple Documentation
There are a few different options. You can manually add them via drag and drop or use one of many framework managers such as Carthage or Cocoapods.
Whatever method you choose has a few steps and can be a bit daunting initially so I’d recommend following a tutorial of some sort(I used YouTube). If done correctly you will be able to just import like you would do any other library.
I have created one project using third party SDK.
I have done some changes in SDK and improves it more.
I want to separate out SDK in such a way that any one can use my SDK in there project.
just as same I have taken it before from somewhere else and used in my project
Is there any standard way to separate out SDK from App?
Probably you took it on a github, if not - let's anyway take github as an example.
First, when you did improves some code of third party library / sdk - i hope you still holding all the code in the same classes or at least connected classes, other way it will hard to work for that code. So, you should just take the code you improved and to contribute. Go over link it will describe you the process of how to support projects with your code.
I have an app that has many components. In my case, there are several visual assets (a pie chart, a bar chart, a line chart, etc), and I'd like to be able to reuse those across multiple projects.
I have coded everything with a nice, top level delegate, which if implemented, the component can run on its own. (similar to UITableViewDelegate, or the like).
What's my best bet for separating the code out? It seems that the options are to create a Framework, or to use a subproject in XCode.
Frameworks look pretty robust, but seem complex to create. Also, with a framework, can you debug/step through code within the framework (assuming I have all the source, since I wrote it).
If anyone has done this for themselves, I'd be grateful for some insight.
I like to package reusable components into CocoaPods and either put them in a shared spec repo or reference them directly in the project's Podfile.
i'm trying to create an app which uses the combination of native functionality and the phoneGap framework. The native app has a button, upon the click of which the phoneGap ui has to be added to the view. Is there any way to achieve this? Are there any tutorials for the same?
Yes, this is possible. Although you might be getting yourself into some headaches. My app kind of goes the other way around, it's mostly phonegap, but occasionally i'll pop open a view that is native. Here is the link to code that shows an excellent example of how to switch between the iOS and phonegap worlds.
new updated recommended article (see update below)
These files represent a standard plugin used in phonegap. In this particular plugin, a native view is opened on top of a phonegap view. Notice you have a custom xib and everything. This plugin can be modified to display any xib with any functionality you could think of.
If you implement this plugin you will easily see how to jump back and forth. I've successfully heavily modified these classes to add LOTS of native capabilities to my phonegap project. Also you should probably check out the official phonegap guide to phonegap plugins. Here
Important Edit
Was informed original linkwas broken (not terribly surprised as this answer is very old and i've long since moved away from Phonegap) so I replaced the original link with an article that shows how to do these plugins well. In the article it explains the link is broken and gives several links where these older files are maintained, but in fact those are broken as well. Here is a branch of one of them I found that still hosts the original files on an "archive" branch. But I haven't investigated whether these files are wildly different from my original work. Good luck!
That's not how Phonegap is meant to be used.
To achieve what you are asking for you just need to create a Phonegap app and add the extra native functionality by writing a Phonegap plugin in Objective-C. You may add as much native code as you want.
I'm actually wanting to do the same thing as the original poster. Theoretically it would be comparatively easy, but non-trival to do. I'd love it if there was a PhoneGapView that one could integrate into an existing project. Bonus points if said PhoneGapView could be integrated in Interface Builder as a re-sizeable and re-positional object, basically think of it as an Object that extends UIWebView.
This is wishful thinking on my part seeing as this is how the higher-ups want my project.