text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```swift
import Foundation
import UIKit
import Gridicons
//import AutomatticTracks
/// Privacy: Lets our users Opt Out from any (and all) trackers.
///
class SPPrivacyViewController: SPTableViewController {
/// Switch Control: Rules the Analytics State
///
private let analyticsSwitch = UISwitch()
///... | /content/code_sandbox/Simplenote/SPPrivacyViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,240 |
```swift
import UIKit
// MARK: - Card dismissal animator
//
final class SPCardDismissalAnimator: NSObject, UIViewControllerAnimatedTransitioning {
private var animator: UIViewImplicitlyAnimating?
func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {
... | /content/code_sandbox/Simplenote/SPCardDismissalAnimator.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 270 |
```swift
import Foundation
// MARK: - NSAttributedString to Markdown Converter
//
struct NSAttributedStringToMarkdownConverter {
/// Markdown replacement for "Unchecked Checklist"
///
private static let unchecked = "- [ ]"
/// Markdown replacement for "Checked Checklist"
///
private static le... | /content/code_sandbox/Simplenote/NSAttributedStringToMarkdownConverter.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 193 |
```swift
import Foundation
extension NSURLComponents {
@objc
func contentFromQuery() -> String? {
return queryItems?.first(where: { query in
query.name == "content"
})?.value
}
@objc
func tagsFromQuery() -> [String]? {
queryItems?
.filter({ $0.name =... | /content/code_sandbox/Simplenote/NSURLComponents+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 119 |
```swift
import Foundation
import UIKit
// MARK: - Value1TableViewCell
//
class Value1TableViewCell: UITableViewCell {
/// Indicates if the row is Selectable
///
var selectable: Bool = true {
didSet {
reloadTextStyles()
}
}
/// Indicates if the row has clear background... | /content/code_sandbox/Simplenote/Value1TableViewCell.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 503 |
```swift
import UIKit
// MARK: - SPShadowView
//
// SPShadowView draws outside shadow, while everyting inside is kept transparent
//
@IBDesignable
final class SPShadowView: UIView {
private let maskLayer = CAShapeLayer()
/// Corner Radius
///
@IBInspectable
var cornerRadius: CGFloat = .zero {
... | /content/code_sandbox/Simplenote/SPShadowView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 856 |
```swift
import Foundation
/// NSObject: Helper Methods
///
extension NSObject {
/// Returns the receiver's classname as a string, not including the namespace.
///
class var classNameWithoutNamespaces: String {
return String(describing: self)
}
}
``` | /content/code_sandbox/Simplenote/NSObject+Helpers.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 52 |
```swift
/*
See LICENSE.txt for this samples licensing information
Abstract:
A struct for accessing generic password keychain items.
*/
import Foundation
enum KeychainError: Error {
case noPassword
case unexpectedPasswordData
case unexpectedItemData
case unhandledError(status: OSStatu... | /content/code_sandbox/Simplenote/KeychainPasswordItem.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,512 |
```swift
import Foundation
// MARK: - Verification
//
extension SPTracker {
static func trackVerificationReviewScreenViewed() {
trackAutomatticEvent(withName: "verification_review_screen_viewed", properties: nil)
}
static func trackVerificationVerifyScreenViewed() {
trackAutomatticEvent(w... | /content/code_sandbox/Simplenote/SPTracker+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 805 |
```swift
import Foundation
enum BuildConfiguration: String {
case debug
case `internal`
case appStore
case release
case unknown
static var current: BuildConfiguration {
#if DEBUG
return .debug
#elseif BUILD_INTERNAL
return .internal
#elseif BUIL... | /content/code_sandbox/Simplenote/BuildConfiguration.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 146 |
```swift
import Foundation
import SwiftUI
import Gridicons
// MARK: - MagicLinkConfirmationView
//
struct MagicLinkInvalidView: View {
@Environment(\.presentationMode) var presentationMode
var onPressRequestNewLink: (() -> Void)?
var body: some View {
NavigationView {
VS... | /content/code_sandbox/Simplenote/MagicLinkInvalidView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 531 |
```swift
import Foundation
// MARK: - SPHistoryVersion: Represents a version of an object
//
struct SPHistoryVersion {
/// Version
///
let version: Int
/// Note's Payload
///
let content: String
/// Latest modification date
///
let modificationDate: Date
/// Designated Initia... | /content/code_sandbox/Simplenote/SPHistoryVersion.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 234 |
```swift
import Foundation
@objcMembers
class StorageSettings: NSObject {
private let fileManager: FileManager
init(fileManager: FileManager = FileManager.default) {
self.fileManager = fileManager
}
/// URL for the managed object model resource
///
let modelURL = Bundle.main.url(forR... | /content/code_sandbox/Simplenote/StorageSettings.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 233 |
```swift
import Foundation
import UIKit
// MARK: - ActivityViewController Simplenote Methods
//
extension UIActivityViewController {
/// Initializes a UIActivityViewController instance that will be able to export a given Note
///
@objc
convenience init?(note: Note) {
guard let content = note.c... | /content/code_sandbox/Simplenote/UIActivityViewController+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 200 |
```swift
import Foundation
// MARK: - SPNoteHistoryController: Business logic for history view controller
//
final class SPNoteHistoryController {
// MARK: - State of the screen
//
enum State {
/// Version (is fully loaded)
/// - Parameters
/// - versionNumber: version number
... | /content/code_sandbox/Simplenote/SPNoteHistoryController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 936 |
```swift
import Foundation
import CoreData
import AutomatticTracks
@objc
class SharedStorageMigrator: NSObject {
private let storageSettings: StorageSettings
private let fileManager: FileManager
init(storageSettings: StorageSettings = StorageSettings(), fileManager: FileManager = FileManager.default) {
... | /content/code_sandbox/Simplenote/SharedStorageMigrator.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 931 |
```swift
import Foundation
import WidgetKit
// MARK: - Initialization
//
extension SPAppDelegate {
/// Simperium Initialization
/// - Important: Buckets that don't have a backing `SPManagedObject` will be dynamic. Invoking `bucketForName` will initialize sync'ing!
///
@objc
func setupSimperium() {... | /content/code_sandbox/Simplenote/SPAppDelegate+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 3,576 |
```swift
import UIKit
import SimplenoteFoundation
// MARK: - NoteInformationViewController
//
final class NoteInformationViewController: UIViewController {
@IBOutlet private weak var tableView: UITableView!
@IBOutlet private weak var dragBar: SPDragBar!
private var transitioningManager: UIViewControllerTr... | /content/code_sandbox/Simplenote/Information/NoteInformationViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,792 |
```swift
import Foundation
import SimplenoteFoundation
final class NoteInformationController {
/// Section
///
struct Section {
let rows: [Row]
}
/// Row
///
enum Row {
/// Metric row
///
case metric(title: String, value: String?)
/// Reference
... | /content/code_sandbox/Simplenote/Information/NoteInformationController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,184 |
```objective-c
//
// main.m
// Simplenote
//
// Created by Tom Witkin on 7/3/13.
//
#import <UIKit/UIKit.h>
#import "SPAppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([SPAppDelegate class]));
}
}
``` | /content/code_sandbox/Simplenote/Supporting Files/main.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 75 |
```swift
import Foundation
// MARK: - CGRect Methods
//
extension CGRect {
/// Returns the resulting Rectangles by splitting the receiver in two, by the specified Rectangle's **minY** and **maxY**
/// - Note: We rely on this API to determine the available editing area above and below the cursor
///
fu... | /content/code_sandbox/Simplenote/Classes/CGRect+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 148 |
```objective-c
#import <Foundation/Foundation.h>
/**
* @class SPTracker
* @brief This class is meant to aid in the app's event tracking. We'll relay the appropriate events to
* either Automattic Tracks, or Google Analytics.
*/
@interface SPTracker : NSObject
#pragma mark - Metadata
+ (v... | /content/code_sandbox/Simplenote/Classes/SPTracker.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 805 |
```swift
import Foundation
import SimplenoteFoundation
import SimplenoteSearch
// MARK: - NotesListController
//
class NotesListController: NSObject {
/// Main Context
///
private let viewContext: NSManagedObjectContext
/// Notes Controller
///
private lazy var notesController = ResultsContro... | /content/code_sandbox/Simplenote/Classes/NotesListController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,794 |
```swift
import UIKit
// MARK: - ApplicationStateProvider
//
extension UIApplication: ApplicationStateProvider {
}
extension UIApplication {
@objc
var keyWindowStatusBarHeight: CGSize {
guard let keyWindow = foregroundSceneWindows.first(where: { $0.isKeyWindow }) else {
return .zero
... | /content/code_sandbox/Simplenote/Classes/UIApplication+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 245 |
```swift
import Foundation
import MessageUI
import SafariServices
// MARK: - SPFeedbackManager
//
@objcMembers
class SPFeedbackManager: NSObject {
/// Ladies and gentlemen, yet another Singleton!
///
static let shared = SPFeedbackManager()
/// Let's just hide the initializer?
///
private over... | /content/code_sandbox/Simplenote/Classes/SPFeedbackManager.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 285 |
```swift
import UIKit
// MARK: - UIResponder
//
extension UIResponder {
private static weak var _currentFirstResponder: UIResponder?
static var currentFirstResponder: UIResponder? {
_currentFirstResponder = nil
UIApplication.shared.sendAction(#selector(UIResponder.findFirstResponder(_:)), to: ... | /content/code_sandbox/Simplenote/Classes/UIResponder+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 100 |
```swift
import Foundation
// MARK: - UIKeyCommand
//
extension UIKeyCommand {
static var inputLeadingArrow: String {
return UIApplication.isRTL ? UIKeyCommand.inputRightArrow : UIKeyCommand.inputLeftArrow
}
static var inputTrailingArrow: String {
return UIApplication.isRTL ? UIKeyCommand... | /content/code_sandbox/Simplenote/Classes/UIKeyCommand+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 164 |
```swift
import UIKit
// MARK: SignupVerificationViewController
//
class SignupVerificationViewController: UIViewController {
@IBOutlet private weak var iconView: UIImageView! {
didSet {
iconView.tintColor = .simplenoteTitleColor
}
}
@IBOutlet private weak var textLabel: UILab... | /content/code_sandbox/Simplenote/Classes/SignupVerificationViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 578 |
```objective-c
//
// TWAcitivityOpenInSafari.m
// Poster
//
// 8/17/12.
//
//
#import "SPAcitivitySafari.h"
@implementation SPAcitivitySafari
- (NSString *)activityType
{
return @"SPAcitivitySafari";
}
- (NSString *)activityTitle
{
return @"Safari";
}
- (UIImage *)activityImage {
return [UIImag... | /content/code_sandbox/Simplenote/Classes/SPAcitivitySafari.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 246 |
```swift
import Foundation
import UIKit
// MARK: - Simplenote's UIImage Static Methods
//
extension UIImage {
/// Returns the UIColor instance matching a given UIColorName. If any
///
@objc
static func image(name: UIImageName) -> UIImage? {
UIImage(named: name.lightAssetFilename)
}
}
``` | /content/code_sandbox/Simplenote/Classes/UIImage+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 69 |
```objective-c
//
// NSString+Attributed.m
// Simplenote
//
// Created by Tom Witkin on 9/2/13.
//
#import "NSString+Attributed.h"
@implementation NSString (Attributed)
- (NSAttributedString *)attributedString {
return [[NSAttributedString alloc] initWithString:self];
}
- (NSMutableAttributedString *)mu... | /content/code_sandbox/Simplenote/Classes/NSString+Attributed.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 89 |
```objective-c
//
// Settings.m
// Simplenote
//
// Created by Jorge Leandro Perez on 3/16/15.
//
#import "Settings.h"
@implementation Settings
@dynamic ghostData;
@dynamic simperiumKey;
@dynamic ratings_disabled;
@dynamic minimum_events;
@dynamic minimum_interval_days;
@dynamic like_skip_versions;
@dynamic de... | /content/code_sandbox/Simplenote/Classes/Settings.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 79 |
```objective-c
//
// UITextView+Simplenote.m
// Simplenote
//
// Created by Jorge Leandro Perez on 3/25/15.
//
#import "UITextView+Simplenote.h"
#import "NSString+Bullets.h"
#pragma mark ====================================================================================
#pragma mark NSTextView (Simplenote)
#pra... | /content/code_sandbox/Simplenote/Classes/UITextView+Simplenote.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,227 |
```swift
import Foundation
import SimplenoteFoundation
// MARK: - SPObjectManager
//
extension SPObjectManager {
var managedObjectContext: NSManagedObjectContext {
return SPAppDelegate.shared().managedObjectContext
}
@objc
func newDefaultNote() -> Note {
guard let note = NSEntityDescr... | /content/code_sandbox/Simplenote/Classes/SPObjectManager+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 413 |
```objective-c
#import "StatusChecker.h"
#import "Note.h"
@import Simperium;
#pragma mark ================================================================================
#pragma mark Workaround: Exposing Private SPBucket methods
#pragma mark ==========================================================================... | /content/code_sandbox/Simplenote/Classes/StatusChecker.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 303 |
```swift
import Foundation
import UIKit
// MARK: - UIFont Simplenote Helpers
//
extension UIFont {
/// Default Asset Height Multiplier
///
static let defaultInlineAssetSizeMultiplier = CGFloat(0.7)
/// Returns the (Expected) InlineAsset Height: We consider the lineHeight, and apply a (default) multip... | /content/code_sandbox/Simplenote/Classes/UIFont+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 666 |
```objective-c
//
// WPAuthHandler.m
// Simplenote
// Handles oauth authentication with WordPress.com
//
#import <Foundation/Foundation.h>
#import <SafariServices/SafariServices.h>
#import "WPAuthHandler.h"
#import "SPConstants.h"
#import "SPTracker.h"
#import "Simplenote-Swift.h"
@import Simperium;
static NSStr... | /content/code_sandbox/Simplenote/Classes/WPAuthHandler.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 904 |
```swift
import Foundation
import UIKit
import SimplenoteFoundation
// MARK: - OptionsControllerDelegate
//
protocol OptionsControllerDelegate: AnyObject {
func optionsControllerDidPressHistory(_ sender: OptionsViewController)
func optionsControllerDidPressShare(_ sender: OptionsViewController)
func option... | /content/code_sandbox/Simplenote/Classes/OptionsViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 3,111 |
```objective-c
#import <Foundation/Foundation.h>
extern NSString *const SPTransitionControllerPopGestureTriggeredNotificationName;
@protocol SPInteractiveDismissableViewController
@property (readonly) BOOL requiresFirstResponderRestorationBypass;
@end
@interface SPTransitionController : NSObject <UINavigationCont... | /content/code_sandbox/Simplenote/Classes/SPTransitionController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 67 |
```objective-c
//
// NSString+Bullets.m
// Simplenote
//
// Created by Tom Witkin on 8/25/13.
//
#import "NSString+Bullets.h"
#pragma mark ====================================================================================
#pragma mark Constants
#pragma mark ======================================================... | /content/code_sandbox/Simplenote/Classes/NSString+Bullets.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 205 |
```swift
import Foundation
// MARK: - NSAttributedString + AuthError Helpers
//
extension NSAttributedString {
/// Returns an Attributed String that translates a Networking Error into human friendly text.
///
/// - Parameters:
/// - statusCode: Response Status Code
/// - response: Response... | /content/code_sandbox/Simplenote/Classes/NSAttributedString+AuthError.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 478 |
```objective-c
//
// SPMarkdownPreviewViewController.m
// Simplenote
//
// Created by James Frost on 01/10/2015.
//
#import "SPMarkdownPreviewViewController.h"
#import "SPMarkdownParser.h"
#import "Simplenote-Swift.h"
@import WebKit;
@import SafariServices;
@interface SPMarkdownPreviewViewController () <WKNavigat... | /content/code_sandbox/Simplenote/Classes/SPMarkdownPreviewViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,014 |
```swift
import Foundation
import CoreSpotlight
import Intents
// MARK: - AppDelegate Shortcuts Methods
//
class ShortcutsHandler: NSObject {
/// This is, gentlemen, a singleton.
///
@objc
static var shared = ShortcutsHandler()
/// Is User authenticated?
///
private var isAuthenticated: B... | /content/code_sandbox/Simplenote/Classes/ShortcutsHandler.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,107 |
```objective-c
//
// Settings.h
// Simplenote
//
// Created by Jorge Leandro Perez on 3/16/15.
//
#import <Simperium/SPManagedObject.h>
@interface Settings : SPManagedObject
@property (nonatomic, copy) NSString *ghostData;
@property (nonatomic, copy) NSString *simperiumKey;
@property (nonatomic, strong) NSN... | /content/code_sandbox/Simplenote/Classes/Settings.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 147 |
```swift
import Foundation
import UIKit
extension UIAlertController {
@discardableResult @objc
func addCancelActionWithTitle(_ title: String?, handler: ((UIAlertAction) -> Void)? = nil) -> UIAlertAction {
return addActionWithTitle(title, style: .cancel, handler: handler)
}
@discardableResult ... | /content/code_sandbox/Simplenote/Classes/UIAlertController+Helpers.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 295 |
```objective-c
//
// SPEntryListViewController.h
// Simplenote
//
// Created by Tom Witkin on 8/19/13.
//
#import <UIKit/UIKit.h>
#import "SPTextField.h"
@interface SPEntryListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate> {
UITableView *primaryTableVie... | /content/code_sandbox/Simplenote/Classes/SPEntryListViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 215 |
```objective-c
#import <Foundation/Foundation.h>
@class Simperium;
#pragma mark ================================================================================
#pragma mark StatusChecker
#pragma mark ================================================================================
@interface StatusChecker : NSObje... | /content/code_sandbox/Simplenote/Classes/StatusChecker.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 51 |
```swift
import Foundation
// MARK: - Simplenote UserDefaults Keys
//
extension UserDefaults {
enum Key: String {
case condensedNotes = "SPCondensedNoteListPref"
case firstLaunch = "SPFirstLaunch"
case lastKnownVersion
case listSortMode
case listSortModeLegacy = "SPAlphabeti... | /content/code_sandbox/Simplenote/Classes/UserDefaults+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 568 |
```swift
import Foundation
import UIKit
// MARK: - Renders a customized Action Sheet
//
class SPSheetController: UIViewController {
/// Dimming Background
///
@IBOutlet private var backgroundView: UIView!
/// View containing the bottom actions
///
@IBOutlet private var actionsView: UIView!
... | /content/code_sandbox/Simplenote/Classes/SPSheetController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 889 |
```swift
import Foundation
// MARK: - Simplenote's Upgrade handling flows
//
class MigrationsHandler: NSObject {
/// Returns the Runtime version
///
private let runtimeVersion = Bundle.main.shortVersionString
/// Stores the last known version.
///
private var lastKnownVersion: String {
... | /content/code_sandbox/Simplenote/Classes/MigrationsHandler.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 242 |
```swift
import Foundation
import CoreSpotlight
// MARK: - Simplenote's NSUserActivities
//
extension NSUserActivity {
/// Registers the Launch Activity
///
@objc
class func launchActivity() -> NSUserActivity {
let title = NSLocalizedString("Open Simplenote", comment: "Siri Suggestion to open ... | /content/code_sandbox/Simplenote/Classes/NSUserActivity+Shortcuts.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 302 |
```objective-c
//
// PersonTag.m
// Simplenote
//
// Created by Michael Johnston on 11-08-23.
//
#import "PersonTag.h"
@implementation PersonTag
- (instancetype)initWithName:(NSString *)aName email:(NSString *)anEmail
{
if ((self = [super init])) {
self.name = aName;
self.email = anEmail;
... | /content/code_sandbox/Simplenote/Classes/PersonTag.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 274 |
```swift
import Foundation
import UIKit
// MARK: - SPNoteTableViewCell
//
@objcMembers
class SPNoteTableViewCell: UITableViewCell {
/// Title Label
///
@IBOutlet private var titleLabel: UILabel!
/// Body Label
///
@IBOutlet private var bodyLabel: UILabel!
/// Note's Left Accessory ImageV... | /content/code_sandbox/Simplenote/Classes/SPNoteTableViewCell.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,881 |
```swift
import Foundation
// MARK: - ApplicationShortcutItemType: Types of application shortcuts
//
enum ApplicationShortcutItemType: String {
case search
case newNote
case note
}
``` | /content/code_sandbox/Simplenote/Classes/ApplicationShortcutItemType.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 39 |
```swift
import Foundation
import SimplenoteEndpoints
// MARK: - SPAuthError
//
enum SPAuthError: Error {
case loginBadCredentials
case signupBadCredentials
case signupUserAlreadyExists
case network
case compromisedPassword
case unverifiedEmail
case tooManyAttempts
case generic
cas... | /content/code_sandbox/Simplenote/Classes/SPAuthError.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,104 |
```swift
import Foundation
import UIKit
// MARK: - UITraitCollection Simplenote Methods
//
extension UITraitCollection {
/// Returns a UITraitCollection that *only* contains the Light Interface Style. No other attribute is initialized
///
static var purelyLightTraits: UITraitCollection {
UITraitCo... | /content/code_sandbox/Simplenote/Classes/UITraitCollection+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 124 |
```swift
import Foundation
import UIKit
// MARK: - UIBezierPath Methods
//
extension UIBezierPath {
/// Returns an UIImage representation of the receiver.
///
func imageRepresentation(color: UIColor) -> UIImage {
return UIGraphicsImageRenderer(size: bounds.size).image { [unowned self] context in
... | /content/code_sandbox/Simplenote/Classes/UIBezierPath+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 84 |
```objective-c
//
// SPCollaboratorCell.h
// Simplenote
//
// Created by Tom Witkin on 7/27/13.
//
#import <UIKit/UIKit.h>
@interface SPEntryListCell : UITableViewCell {
UILabel *primaryLabel;
UILabel *secondaryLabel;
UIImageView *checkmarkImageView;
}
- (void)setupWithPrimaryText:(NSString *)pri... | /content/code_sandbox/Simplenote/Classes/SPEntryListCell.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 100 |
```swift
import UIKit
// MARK: - UITextInput
//
extension UITextInput {
/// Returns NSRange from UITextRange
///
var selectedRange: NSRange? {
guard let range = selectedTextRange else { return nil }
let location = offset(from: beginningOfDocument, to: range.start)
let length = offse... | /content/code_sandbox/Simplenote/Classes/UITextInput+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 95 |
```swift
import UIKit
// MARK: - RoundedView
//
class RoundedView: UIView {
override var bounds: CGRect {
didSet {
guard bounds.size != oldValue.size else {
return
}
updateCornerRadius()
}
}
override init(frame: CGRect) {
super.i... | /content/code_sandbox/Simplenote/Classes/RoundedView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 148 |
```swift
import Foundation
// MARK: - NSString Simplenote Helpers
//
extension NSString {
/// Returns the full range of the receiver
///
@objc
var fullRange: NSRange {
NSRange(location: .zero, length: length)
}
/// Encodes the receiver as a `Tag Hash`
///
@objc
var byEncod... | /content/code_sandbox/Simplenote/Classes/NSString+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 164 |
```objective-c
//
// SPCollaboratorCell.m
// Simplenote
//
// Created by Tom Witkin on 7/27/13.
//
#import "SPEntryListCell.h"
#import "Simplenote-Swift.h"
static CGFloat const EntryListCellSidePadding = 15;
@implementation SPEntryListCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifie... | /content/code_sandbox/Simplenote/Classes/SPEntryListCell.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 705 |
```swift
import UIKit
// MARK: - SPMarkdownPreviewViewController
//
extension SPMarkdownPreviewViewController {
open override var canBecomeFirstResponder: Bool {
return true
}
open override var keyCommands: [UIKeyCommand]? {
return [
UIKeyCommand(input: "p",
... | /content/code_sandbox/Simplenote/Classes/SPMarkdownPreviewViewController+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 172 |
```objective-c
#import <UIKit/UIKit.h>
#import "SPTableViewController.h"
@interface SPSettingsViewController : SPTableViewController <UIPickerViewDelegate, UIPickerViewDataSource> {
//Preferences
NSNumber *sortOrderPref;
NSNumber *numPreviewLinesPref;
}
@end
extern NSString *const SPAlphabeticalTagSortPr... | /content/code_sandbox/Simplenote/Classes/SPSettingsViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 78 |
```swift
import Foundation
// MARK: - ApplicationStateProvider
//
protocol ApplicationStateProvider {
var applicationState: UIApplication.State { get }
}
``` | /content/code_sandbox/Simplenote/Classes/ApplicationStateProvider.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 29 |
```objective-c
#import "SPInteractiveTextStorage.h"
NSString *const SPDefaultTokenName = @"SPDefaultTokenName";
NSString *const SPHeadlineTokenName = @"SPHeadlineTokenName";
@interface SPInteractiveTextStorage ()
@property (nonatomic, strong) NSMutableAttributedString *backingStore;
@property (nonatomic, assign) BOO... | /content/code_sandbox/Simplenote/Classes/SPInteractiveTextStorage.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 693 |
```swift
import Foundation
import SimplenoteEndpoints
// MARK: - Notifications
//
extension NSNotification.Name {
static let magicLinkAuthWillStart = NSNotification.Name("magicLinkAuthWillStart")
static let magicLinkAuthDidSucceed = NSNotification.Name("magicLinkAuthDidSucceed")
static let magicLinkAuthDi... | /content/code_sandbox/Simplenote/Classes/MagicLinkAuthenticator.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 803 |
```objective-c
//
// SPCollaboratorCompletionCell.m
// Simplenote
//
// Created by Tom Witkin on 7/27/13.
//
#import "SPEntryListAutoCompleteCell.h"
@implementation SPEntryListAutoCompleteCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithS... | /content/code_sandbox/Simplenote/Classes/SPEntryListAutoCompleteCell.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 117 |
```objective-c
#import <UIKit/UIKit.h>
@interface SPModalActivityIndicator : UIView {
CGRect boxFrame;
UIView *topView;
}
@property (nonatomic, retain) UIView *contentView;
+ (SPModalActivityIndicator *)showInWindow:(UIWindow *)window;
- (void)dismiss:(BOOL)animated completion:(void (^)())completion;
@... | /content/code_sandbox/Simplenote/Classes/SPModalActivityIndicator.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 71 |
```objective-c
//
// SPTagTextView.h
// Simplenote
//
// Created by Tom Witkin on 7/24/13.
//
#import <UIKit/UIKit.h>
#import "SPTextField.h"
@class SPTagEntryField;
@protocol SPTagEntryFieldDelegate <NSObject>
@optional
- (void)tagEntryFieldDidChange:(SPTagEntryField *)tagTextField;
@end
@interface SPTagEntry... | /content/code_sandbox/Simplenote/Classes/SPTagEntryField.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 114 |
```swift
import Foundation
import UIKit
// MARK: - InterlinkViewController
//
class InterlinkViewController: UIViewController {
/// Autocomplete TableView
///
@IBOutlet private var tableView: HuggableTableView!
/// Closure to be executed whenever a Note is selected. The Interlink URL will be passed a... | /content/code_sandbox/Simplenote/Classes/InterlinkViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 607 |
```swift
import Foundation
import UIKit
// MARK: - Simplenote's Theme
//
@objc
class SPUserInterface: NSObject {
/// Ladies and gentlemen, this is a singleton.
///
@objc
static let shared = SPUserInterface()
/// Indicates if the User Interface is in Dark Mode
///
@objc
static var isDa... | /content/code_sandbox/Simplenote/Classes/SPUserInterface.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 381 |
```objective-c
//
// JSONKit+Simplenote.m
// Simplenote-iOS
//
// Created by Jorge Leandro Perez on 1/4/14.
//
#import "JSONKit+Simplenote.h"
#ifdef DEBUG
static NSJSONWritingOptions const SPJSONWritingOptions = NSJSONWritingPrettyPrinted;
#else
static NSJSONWritingOptions const SPJSONWritingOptions = 0;
#endif
... | /content/code_sandbox/Simplenote/Classes/JSONKit+Simplenote.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 429 |
```objective-c
//
// SPTextView.h
// Simplenote
//
// Created by Tom Witkin on 7/19/13.
// Created by Michael Johnston on 7/19/13.
//
#import <UIKit/UIKit.h>
@class SPInteractiveTextStorage;
@interface SPTextView : UITextView {
NSMutableArray *highlightViews;
}
/// Interactive Storage: Custom formatting over... | /content/code_sandbox/Simplenote/Classes/SPTextView.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 215 |
```swift
import Foundation
import UIKit
// MARK: - UIColor + Studio API(s)
//
extension UIColor {
/// Initializes a new UIColor instance with a given ColorStudio value
///
convenience init(studioColor: ColorStudio, alpha: CGFloat = UIKitConstants.alpha1_0) {
self.init(hexString: studioColor.rawVal... | /content/code_sandbox/Simplenote/Classes/UIColor+Studio.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,882 |
```swift
import Foundation
import UIKit
// MARK: - UIGestureRecognizer Simplenote Methods
//
extension UIGestureRecognizer {
/// Forgive me: this is the only known way (AFAIK) to force a recognizer to fail. Seen in WWDC 2014 (somewhere), and a better way is yet to be found.
///
@objc
func fail() {
... | /content/code_sandbox/Simplenote/Classes/UIGestureRecognizer+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 199 |
```swift
import UIKit
// MARK: - Keyboard shortcuts
//
extension SPSidebarContainerViewController {
open override var canBecomeFirstResponder: Bool {
return true
}
open override var keyCommands: [UIKeyCommand]? {
guard presentedViewController == nil else {
return nil
}
... | /content/code_sandbox/Simplenote/Classes/SPSidebarViewController+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 432 |
```objective-c
//
// UIImage+Colorization.h
//
// Created by Tom Witkin on 1/13/13.
//
#import <UIKit/UIKit.h>
@interface UIImage (Colorization)
- (UIImage *)imageWithOverlayColor:(UIColor *)color;
@end
``` | /content/code_sandbox/Simplenote/Classes/UIImage+Colorization.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 54 |
```objective-c
//
// SPMarkdownPreviewViewController.h
// Simplenote
//
// Created by James Frost on 01/10/2015.
//
#import <UIKit/UIKit.h>
#import "SPInteractivePushPopAnimationController.h"
/**
* @class SPMarkdownPreviewViewController
* @brief Displays Markdown text rendered as HTML in a web view.... | /content/code_sandbox/Simplenote/Classes/SPMarkdownPreviewViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 118 |
```swift
import UIKit
// MARK: - SortModePickerViewController
//
class SortModePickerViewController: UIViewController {
@IBOutlet private weak var tableView: HuggableTableView! {
didSet {
tableView.register(Value1TableViewCell.self, forCellReuseIdentifier: Value1TableViewCell.reuseIdentifier)
... | /content/code_sandbox/Simplenote/Classes/SortModePickerViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 486 |
```objective-c
#import <UIKit/UIKit.h>
@interface SPInteractiveTextStorage : NSTextStorage
@property (nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *defaultStyle;
@property (nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *headlineStyle;
@end
``` | /content/code_sandbox/Simplenote/Classes/SPInteractiveTextStorage.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 53 |
```swift
import Foundation
@objc extension NSString {
var count: Int {
let aString = self as String
return aString.count
}
var charCount: Int {
let aString = self as String
var result = 0
for char in aString {
if !CharacterSet.newlines.contains(char.unic... | /content/code_sandbox/Simplenote/Classes/NSString+Count.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 932 |
```objective-c
//
// SPAutomatticTracker.h
// Simplenote
//
// Created by Jorge Leandro Perez on 10/9/15.
//
#import <Foundation/Foundation.h>
/**
* @class SPAutomatticTracker
* @brief The purpose of this class is to encapsulate all of the interaction required with A8C's Tracks.
*/
@interface SPAu... | /content/code_sandbox/Simplenote/Classes/SPAutomatticTracker.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 224 |
```swift
import Foundation
import UIKit
// MARK: - Dynamic Images
//
extension UIImage {
/// Returns the SearchBar Background Image
///
class var searchBarBackgroundImage: UIImage {
let tintColor = UIColor.simplenoteSearchBarBackgroundColor.withAlphaComponent(SearchBackgroundMetrics.alpha)
... | /content/code_sandbox/Simplenote/Classes/UIImage+Dynamic.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 156 |
```objective-c
#import "SPSettingsViewController.h"
#import "SPAppDelegate.h"
#import "SPConstants.h"
#import "StatusChecker.h"
#import "SPTracker.h"
#import "SPDebugViewController.h"
#import "Simplenote-Swift.h"
#import "Simperium+Simplenote.h"
NSString *const SPAlphabeticalTagSortPref = @"S... | /content/code_sandbox/Simplenote/Classes/SPSettingsViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 5,963 |
```swift
import Foundation
// MARK: - UIActivityItem With Special Treatment for WordPress iOS
//
class SimplenoteActivityItemSource: NSObject, UIActivityItemSource {
/// The Note that's about to be exported
///
private let content: String
private let targetURL: URL
/// Designated Initializer
... | /content/code_sandbox/Simplenote/Classes/SimplenoteActivityItemSource.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 287 |
```objective-c
//
// SPTableViewController.h
// Simplenote
//
// Created by Tom Witkin on 10/13/13.
//
#import <UIKit/UIKit.h>
@interface SPTableViewController : UITableViewController
@end
``` | /content/code_sandbox/Simplenote/Classes/SPTableViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 47 |
```swift
import UIKit
import SimplenoteEndpoints
// MARK: - Subscriber UI
//
// The methods in this extension are for showing and displaying the Sustainer banner in settings. We are discontinuing Sustainer,
// but we may still want to use the banner in the future, so marking these methods fileprivate and have remov... | /content/code_sandbox/Simplenote/Classes/SPSettingsViewController+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,276 |
```objective-c
#import "SPAddCollaboratorsViewController.h"
#import "SPEntryListCell.h"
#import "SPEntryListAutoCompleteCell.h"
#import "NSString+Metadata.h"
#import "PersonTag.h"
#import <ContactsUI/ContactsUI.h>
#import "Simplenote-Swift.h"
#pragma mark - Private Helpers
@interface SPAddCollaboratorsViewControlle... | /content/code_sandbox/Simplenote/Classes/SPAddCollaboratorsViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,965 |
```swift
import Foundation
import UIKit
// MARK: - UIView's Animation Methods
//
extension UIView {
/// Animation for reloading the view
///
enum ReloadAnimation {
case slideLeading
case slideTrailing
case shake
}
/// Slide direction
///
enum SlideDirection {
... | /content/code_sandbox/Simplenote/Classes/UIView+Animations.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,022 |
```swift
import Foundation
// MARK: - Simplenote Constants!
//
@objcMembers
class SimplenoteConstants: NSObject {
/// Password Validation Rules
///
static let passwordRules = "minlength: 8; maxlength: 50;"
/// Simplenote: Scheme
///
static let simplenoteScheme = "simplenote"
/// Simpleno... | /content/code_sandbox/Simplenote/Classes/SimplenoteConstants.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 434 |
```swift
import Foundation
import UIKit
// MARK: - UIKit Constants, so that we don't repeat ourselves forever!
//
@objcMembers
class UIKitConstants: NSObject {
static let alpha0_0 = CGFloat(0)
static let alpha0_1 = CGFloat(0.1)
static let alpha0_2 = CGFloat(0.2)
static let alpha0_4 = CGFloat(0.4)
s... | /content/code_sandbox/Simplenote/Classes/UIKitConstants.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 279 |
```objective-c
#import <UIKit/UIKit.h>
@class SPSidebarContainerViewController;
@protocol SPSidebarContainerDelegate <NSObject>
@required
- (BOOL)sidebarContainerShouldDisplaySidebar:(SPSidebarContainerViewController *)sidebarContainer;
- (void)sidebarContainerWillDisplaySidebar:(SPSidebarContainerViewController *)... | /content/code_sandbox/Simplenote/Classes/SPSidebarContainerViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 260 |
```swift
import Foundation
// MARK: - NSMutableParagraphStyle
//
extension NSMutableParagraphStyle {
convenience init(lineSpacing: CGFloat) {
self.init()
self.lineSpacing = lineSpacing
}
}
``` | /content/code_sandbox/Simplenote/Classes/NSMutableParagraphStyle+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 42 |
```objective-c
#import <UIKit/UIKit.h>
typedef void(^SPNavigationControllerBlock)(void);
@interface SPNavigationController : UINavigationController
@property (nonatomic) BOOL displaysBlurEffect;
@property (nonatomic) BOOL disableRotation;
@property (nonatomic, copy) SPNavigationControllerBlock onWillDismiss;
@end
... | /content/code_sandbox/Simplenote/Classes/SPNavigationController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 57 |
```objective-c
//
// SPDebugViewController.h
// Simplenote
//
// Created by Jorge Leandro Perez on 6/3/14.
//
#import <UIKit/UIKit.h>
#import "SPTableViewController.h"
@interface SPDebugViewController : SPTableViewController
+ (instancetype)newDebugViewController;
@end
``` | /content/code_sandbox/Simplenote/Classes/SPDebugViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 64 |
```objective-c
#import <UIKit/UIKit.h>
#import "SPEntryListViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class SPAddCollaboratorsViewController;
@protocol SPCollaboratorDelegate <NSObject>
@required
- (BOOL)collaboratorViewController:(SPAddCollaboratorsViewController *)viewController
shouldAddCollabora... | /content/code_sandbox/Simplenote/Classes/SPAddCollaboratorsViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 198 |
```swift
import Foundation
import SafariServices
import SimplenoteEndpoints
// MARK: - SPAuthHandler
//
class SPAuthHandler {
/// Simperium Authenticator
///
private let simperiumService: SPAuthenticator
/// Designated Initializer.
///
/// - Parameter simperiumService: Reference to a valid SP... | /content/code_sandbox/Simplenote/Classes/SPAuthHandler.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 913 |
```swift
//
// SPSortOrderViewController.swift
// Simplenote
//
//
import Foundation
import UIKit
// MARK: - Settings: Sort Order
//
class SPSortOrderViewController: UITableViewController {
/// Selected SortMode
///
@objc
var selectedMode: SortMode = .alphabeticallyAscending {
didSet {
... | /content/code_sandbox/Simplenote/Classes/SPSortOrderViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 755 |
```swift
import UIKit
// MARK: - RoundedButton
//
class RoundedButton: UIButton {
override var bounds: CGRect {
didSet {
guard bounds.size != oldValue.size else {
return
}
updateCornerRadius()
}
}
override init(frame: CGRect) {
s... | /content/code_sandbox/Simplenote/Classes/RoundedButton.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.