Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
410 changes: 410 additions & 0 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
43 changes: 43 additions & 0 deletions Example/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// AppDelegate.swift
// Example
//
// Created by Bruno Muniz on 8/13/18.
// Copyright © 2018 Bruno Muniz. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

Original file line number Diff line number Diff line change
@@ -1,18 +1,53 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
Expand Down Expand Up @@ -44,10 +79,20 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
}
6 changes: 6 additions & 0 deletions Example/Example/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
25 changes: 25 additions & 0 deletions Example/Example/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
45 changes: 45 additions & 0 deletions Example/Example/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="UdB-Nc-Kpr">
<rect key="frame" x="0.0" y="10" width="375" height="667"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="UdB-Nc-Kpr" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="7Ue-WG-eW0"/>
<constraint firstItem="UdB-Nc-Kpr" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="APb-PJ-ksg"/>
<constraint firstItem="UdB-Nc-Kpr" firstAttribute="width" secondItem="8bC-Xf-vdC" secondAttribute="width" id="P2Z-xE-BvQ"/>
<constraint firstItem="UdB-Nc-Kpr" firstAttribute="height" secondItem="8bC-Xf-vdC" secondAttribute="height" id="ghe-43-0Uh"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="textView" destination="UdB-Nc-Kpr" id="Q0O-9Z-45k"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,25 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Main</string>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -35,6 +31,8 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
*CocoaPods Events*

#Code of Conduct#
$#Code of Conduct#$
All attendees, speakers, sponsors and volunteers at our meetup are required to agree with the following code of conduct. Team members will enforce this code throughout the event. We are expecting cooperation from all participants to help ensuring a safe environment for everybody.

#tl;dr: Don’t be a Jerk#
Our meetups are dedicated to providing a harassment-free experience for everyone, regardless of gender, age, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of participants in any form. Sexual language and imagery is not appropriate for any parts of our events, including talks, workshops, Twitter and other online media. Attendees violating these rules may be sanctioned or expelled from this meetup and/or any future meetups at the discretion of the meetup organisers. You can report violators to info@cocoapods.org if you prefer to not do so in-person.
$#tl;dr: Don’t be a Jerk#$
Our meetups are dedicated to providing a harassment-free experience for everyone, regardless of gender, age, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate *harassment* of participants in any form. Sexual language and imagery is not appropriate for any parts of our events, including talks, workshops, Twitter and -other online media-. Attendees violating these rules may be sanctioned or expelled from this meetup and/or any future meetups at the discretion of the meetup organisers. You can report violators to #info@cocoapods.org# if you prefer to not do so in-person.

*Privacy Policy*
$*Privacy Policy*$
CocoaPods ("CocoaPods" or the "Company") is committed to protecting the privacy of your information. This privacy statement describes CocoaPods's privacy practises.

Covered
This privacy policy covers the information practises of any CocoaPods product or service.

Information Collected
CocoaPods offers a variety of services that are collectively referred to as the "Services". CocoaPods collects information from individuals who visit the Company's Web site ("Visitors") and individuals who register to use the Services ("Customers").
CocoaPods offers a variety of services that are collectively referred to as the "Services". CocoaPods collects information from individuals who visit the Company's Web site ("Visitors") and individuals who register to use *the Services* ("Customers").

We collect the e-mail addresses of those who communicate with us via e-mail, aggregate information on what pages consumers access or visit, and information volunteered by the consumer (such as survey information and/or site registrations). The information we collect is used to improve the content of our Web pages and the quality of our service, and is not shared with or sold to other organizations for commercial purposes, except to provide products or services you've requested, when we have your permission, or under the following circumstances:

Expand Down Expand Up @@ -74,4 +74,4 @@ The look and feel of the Service is copyright ©2015 CocoaPods. All rights reser
#Cancellation and Termination#
All Content that you uploaded or otherwise added to the Service will be immediately deleted from the Service upon cancellation of your account. This information can not be recovered once your account is cancelled. We encourage all users to backup their data at all times.

We reserve the right to suspend or terminate your account and/or any and all current or future access to or use of any and all of the Service, for any reason, without liability, at any time at our sole discretion. Such termination may result in the deactivation or deletion of your account and your access to your account, and/or the deletion, forfeiture and/or relinquishment of all Content previously made available on or through the Service under your account. We reserve the right to refuse service to anyone for any reason at any time.
We reserve the right to suspend or terminate your account and/or any and all current or future access to or use of any and all of the Service, for any reason, without liability, at any time at our sole discretion. Such termination may result in the deactivation or deletion of your account and your access to your account, and/or the deletion, forfeiture and/or relinquishment of all Content previously made available on or through the Service under your account. We reserve the right to refuse service to anyone for any reason at any time.
33 changes: 33 additions & 0 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// ViewController.swift
// Example
//
// Created by Bruno Muniz on 8/13/18.
// Copyright © 2018 Bruno Muniz. All rights reserved.
//

import UIKit
import R87AttributedString

final class ViewController: UIViewController {

// MARK: - IBOutlets
@IBOutlet private weak var textView: UITextView!

// MARK: - Lifecycle
override func viewDidLoad() {
super.viewDidLoad()

let path = Bundle.main.path(forResource: "TermsOfUse", ofType: "txt")
let plainText = try? String(contentsOfFile: path!, encoding: String.Encoding.utf8)
let attributedString = NSMutableAttributedString(string: plainText!)

attributedString.r87_addAttribute(name: .foregroundColor, value: UIColor.red, betweenCharacters: "*")
attributedString.r87_setAttributes(attributes: [.foregroundColor: UIColor.green], betweenCharacters: "#")
attributedString.r87_addAttributes(attributes: [.font: UIFont.systemFont(ofSize: 25)], betweenCharacters: "$")
attributedString.r87_removeAttribute(name: NSAttributedStringKey.font, betweenCharacters: "-")

textView.attributedText = attributedString
}
}

6 changes: 4 additions & 2 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

pod 'R87AttributedString', :path => '../'
target 'Example' do
platform :ios, '7.0'
pod 'R87AttributedString', :path => '../'
end
10 changes: 6 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
PODS:
- R87AttributedString (0.1.0)
- R87AttributedString (0.2.0)

DEPENDENCIES:
- R87AttributedString (from `../`)

EXTERNAL SOURCES:
R87AttributedString:
:path: ../
:path: "../"

SPEC CHECKSUMS:
R87AttributedString: 3467ab9002bbdba0ee48dc4bbf069a786de5996d
R87AttributedString: 628f646f9a9873f8cf35b291709bc3fe354eb8ab

COCOAPODS: 0.39.0
PODFILE CHECKSUM: 144793c206761a182cbd7984013ba0a149ee307f

COCOAPODS: 1.5.3

This file was deleted.

23 changes: 0 additions & 23 deletions Example/Pods/Local Podspecs/R87AttributedString.podspec.json

This file was deleted.

14 changes: 0 additions & 14 deletions Example/Pods/Manifest.lock

This file was deleted.

Loading