Translate pod into a Swift version - #1
Conversation
reden87
left a comment
There was a problem hiding this comment.
@brunomunizaf you should do a few changes before allowing the PR.
Also I couldn't run the example project so I did not check the R87AttributedString.swift file yet, please fix the following and commented problems so I can check the important things :)
General:
- update README file
- it should show Swift code example
- the iOS compatibility should be updated also
- update the podspec file (the platform version should be modified in the
s.platformline)
Example related:
- the
Podfolder and theR87AttributedString.xcworkspacefile should be removed from source control, they are generated with the pod install command - the Podfile is not valid, there should be a
targetin it - the Podfile does not contain a target iOS version
- the project has some serious errors when I open it:
After you fix these I'll try the example and comment on the R87AttributedString.swift file if necessary.
| var window: UIWindow? | ||
|
|
||
|
|
||
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { |
There was a problem hiding this comment.
please remove all unnecessary code from here
| <key>UISupportedInterfaceOrientations</key> | ||
| <array> | ||
| <string>UIInterfaceOrientationPortrait</string> | ||
| <string>UIInterfaceOrientationLandscapeLeft</string> |
There was a problem hiding this comment.
no need for multiple orientations in the example project, use only Portrait
| override func viewDidLoad() { | ||
| super.viewDidLoad() | ||
|
|
||
| let attributedString = NSMutableAttributedString.init(string: "*Bruno* #Muniz# $Aze-ve-do$") |
There was a problem hiding this comment.
You should use the original TermsOfUse.txt JSON file in the example project, it shows a real use case. You can check how the original example looked like in the Screenshots folder
| import UIKit | ||
|
|
||
| class ViewController: UIViewController { | ||
| @IBOutlet weak var label: UILabel! |
| // Copyright © 2017 bmaf. All rights reserved. | ||
| // | ||
| import UIKit | ||
| public extension NSMutableAttributedString { |
There was a problem hiding this comment.
This file should not exist in the project. The R87AttributedString.swift file should be loaded with CocoaPods and should be removed from the example project's folder completely.

This PR translates the pod into a Swift version.
The example has also been substituted.