Seismograph Chart in Swift - ios

I am creating a seismic recording app in IOS. I want to show seismograph chart in my app like . I have searched a lot on google and github but unable to find EXACTLY same visual. I am currently using "Charts" library from github but it is not producing same visual effect. Please suggest me just name of library.

use LineChartView of this {https://github.com/danielgindi/Charts} library. By default your view will not resemble to seismograph but you need to customise it. To do this, whenever you add a point to graph, also add the point of same value but negative value. For example you want to show an earth-quake of magnitude 5. You should add a point of value 5. At the same time also add a point of value -5. This will give view like seismograph. If you can’t understand then reply, I will provide you code for doing this.

What about this https://github.com/vegather/GraphView ?
It will not compile unless you build against a device (even a generic one) because it uses metal.

Related

How to programmatically use the language translation function in iOS? [Swift 5]

I am aware that there is a Translate function in a text menu in UITextView in iOS
(see for example Remove Translate and share options from selection menu on textview in xamarin).
I would like to use this function by myself without using the Translate menu. For example, I would like to translate an entire sentence displayed in a UITextView instead of translating only the selected parts.
Is there a specific func that we can use? How can I call this function?
Apple's translate API is not available to the public.
https://developer.apple.com/forums/thread/650024
You can use Google's GoogleMLKit/Translate instead.
Use ML Kit on iOS.
Add GoogleMLKit/Translate in your podfile by running the following command in the terminal.
pod 'GoogleMLKit/Translate', '3.1.0'
Read the Instal & Getting started sections on https://cocoapods.org/ if you have not set cocoapods or you do not know how to do so.
Google has written a very good sample code. It is straight forward.
Read from the Translate a string of text section onwards.
https://developers.google.com/ml-kit/language/translation/ios
info:
You may find this link helpful.
https://maximbilan.medium.com/googletranslate-api-in-swift-a36489a84508

using Stripes bank example UI in Swift project

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.

Dynamic 3DObject use in ARKit-SceneKit

I want to download the 3D Object-dae(collada) file from server and want to display on surface dynamically so can please share how can I achieve this in ARKit via SceneKit or else?
You can check this link: https://the-nerd.be/2014/11/07/dynamically-load-collada-files-in-scenekit-at-runtime/ it is old post but I don't think something is changed since that
According to this (see the Discussion section): https://developer.apple.com/documentation/modelio/mdlasset/1391813-canimportfileextension?language=objc
dae is not supported at runtime (ModelIO).
Additionally I'm working on a library called AssetKit (In Progress) and it will full support COLLADA and glTF, it is too early to say that but after initial release, you will be able to load dae files dynamically. It is written with C99 but I'll optimize it for Swift (by writing wrappers or integration with SceneKit...). Since it is still in progress I suggest that follow the first link

Coloring the dates in calendar using swift

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.

iOS 7 Content stretches over several UITableViewCells

Follow-up question to my other question "iOS tableView with time at left"
I'm trying to implement a calendar like application like this using this project found at GitHub
I've tried to create a ViewController with a CollectionView and also a CollectionViewController, then import "MSCollectionViewCalendarLayout" header and implementation file and setting them as a custom layout for the CollectionView.
Trying to build from the workspace file gives me this error:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Trying to build from the Xcode project file gives me this error along with the above one:
RestKit.h file not found
What is the correct way to start using this project using a simple structure for every item?
I can't seem to find any tutorial or similar with instructions on how to get started.
My question is as follows: Can someone help me explain how I can get started with this, without using the SeatGeek API?
Thanks a lot for help!
There seem to be a couple problems here: What's going on with the example first, then why it's going under your navigation stuff second.
I'll start with the first issue.
His example is using Cocoapods, and it seems like he attempted to attach the completed xcworkspace to make it easier, but it didn't work for me either.
I'd suggest installing Cocoapods and running the pod install yourself. All the instructions for how to do that should be in that link.
After doing that, the thing still wouldn't compile because some pod is attempting to set an enum to something that isn't a compile time constant. Just go ahead and change the enum values to constants (should be 1000, 750, 250, 50 respectively for the missing values) for the sake of getting the example running. If you were using pods in production code, you would NEVER want to do this, but since this is an example utilizing outdated pods, just take the path of least resistance here.
As far as the content being under the navigation bar, you're probably going to have to muck about with setting the CollectionView's contentInsets. You could also just pin the CollectionView to be under that header bit you have there with autolayout or frames.

Resources