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 |
|---|---|---|---|---|---|---|---|---|
```objective-c
#import "SPAutomatticTracker.h"
#import "TracksService.h"
@import AutomatticTracksModelObjC;
static NSString *const TracksUserDefaultsAnonymousUserIDKey = @"TracksUserDefaultsAnonymousUserIDKey";
static NSString *const TracksUserDefaultsLoggedInUserIDKey = @"TracksUserDefaultsLoggedInUserIDKey";
stati... | /content/code_sandbox/Simplenote/Classes/SPAutomatticTracker.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,094 |
```swift
import Foundation
// MARK: - Editor Factory (!)
//
@objcMembers
class EditorFactory: NSObject {
/// Yet another Singleton
///
static let shared = EditorFactory()
/// Editor's Restoration Class
///
var restorationClass: UIViewControllerRestoration.Type?
/// Scroll position cache
... | /content/code_sandbox/Simplenote/Classes/EditorFactory.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 291 |
```swift
import UIKit
// MARK: - UITextField
//
extension UITextField {
/// Preprocess pasteboard content before pasting into tag text field
///
@objc
func pasteTag() {
guard let selectedRange = selectedRange,
let pasteboardText = UIPasteboard.general.string, !pasteboardText.isEmp... | /content/code_sandbox/Simplenote/Classes/UITextField+Tag.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 144 |
```swift
import Foundation
import UIKit
// MARK: - SPTagHeaderView
//
@objc @objcMembers
class SPTagHeaderView: UIView {
/// Leading TitleLabel
///
@IBOutlet private(set) var titleLabel: UILabel!
/// Trailing ActionButton
///
@IBOutlet private(set) var actionButton: UIButton! {
didSet... | /content/code_sandbox/Simplenote/Classes/SPTagHeaderView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 168 |
```swift
import Foundation
import UIKit
// MARK: - Simplenote Named Images
//
@objc
enum UIImageName: Int, CaseIterable {
case add
case allNotes
case archive
case arrowTopRight
case checklist
case checkmarkChecked
case checkmarkUnchecked
case chevronLeft
case chevronRight
case c... | /content/code_sandbox/Simplenote/Classes/UIImageName.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 983 |
```objective-c
//
// Note.m
//
// Created by Michael Johnston on 01/07/08.
//
#import "Note.h"
#import "NSString+Condensing.h"
#import "NSString+Metadata.h"
#import "JSONKit+Simplenote.h"
#import "Simplenote-Swift.h"
@interface Note (PrimitiveAccessors)
- (NSString *)primitiveContent;
- (void)setPrimitiveContent:(... | /content/code_sandbox/Simplenote/Classes/Note.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 3,931 |
```swift
import Foundation
import UIKit
// MARK: - SPLabel: Standard UIKit Label with extra properties. And batteries!
//
@IBDesignable
class SPLabel: UILabel {
/// # Insets to be applied over the actual text
///
@IBInspectable var textInsets = UIEdgeInsets.zero
// MARK: - Overrides
override fun... | /content/code_sandbox/Simplenote/Classes/SPLabel.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 144 |
```swift
import Foundation
// MARK: - Color Studio Constants
// Ref. path_to_url
//
enum ColorStudio: String {
case black = "000000"
case blue0 = "e9eff5"
case blue5 = "c5d9ed"
case blue10 = "9ec2e6"
case blue20 = "72aee6"
case blue30 =... | /content/code_sandbox/Simplenote/Classes/ColorStudio.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,753 |
```swift
import Foundation
// MARK: - Represents all of the available Themes
//
@objc
enum Theme: Int, CaseIterable {
/// Darkness!
///
case dark
/// Old School Light
///
case light
/// Matches the System Settings
///
case system
/// Returns a localized Description, matching... | /content/code_sandbox/Simplenote/Classes/Theme.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 214 |
```swift
import UIKit
class SPAboutViewController: UIViewController {
private let tableView = HuggableTableView(frame: .zero, style: .grouped)
private let containerView = UIStackView()
private let doneButton = RoundedCrossButton()
private var viewSpinner: ViewSpinner?
override var preferredStatus... | /content/code_sandbox/Simplenote/Classes/SPAboutViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 6,898 |
```swift
import Foundation
// MARK: - IndexPath
//
extension IndexPath {
func transpose(toSection newSection: Int) -> IndexPath {
IndexPath(row: row, section: newSection)
}
}
``` | /content/code_sandbox/Simplenote/Classes/IndexPath+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 41 |
```swift
import Foundation
import UIKit
// MARK: - UIViewController Helpers
//
extension UIViewController {
/// YES! You guessed right! By default, the restorationIdentifier will be the class name
///
class var defaultRestorationIdentifier: String {
classNameWithoutNamespaces
}
/// Retur... | /content/code_sandbox/Simplenote/Classes/UIViewController+Helpers.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 186 |
```objective-c
//
// TWAcitivityOpenInSafari.h
// Poster
//
// 8/17/12.
//
//
#import <UIKit/UIKit.h>
@interface SPAcitivitySafari : UIActivity
{
NSURL *openURL;
}
@end
``` | /content/code_sandbox/Simplenote/Classes/SPAcitivitySafari.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 55 |
```swift
import Foundation
// MARK: - SPSquaredButton: Simple convenience UIButton subclass, with a default corner radius
//
@IBDesignable
class SPSquaredButton: UIButton {
/// Default Radius
///
private let defaultCornerRadius = CGFloat(4)
/// Outer Border Radius
///
@IBInspectable var corne... | /content/code_sandbox/Simplenote/Classes/SPSquaredButton.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 182 |
```swift
import Foundation
// MARK: - UIKeyboardAppearance
//
extension UIKeyboardAppearance {
/// Returns the Keyboard Appearance matching the current Style
///
static var simplenoteKeyboardAppearance: UIKeyboardAppearance {
SPUserInterface.isDark ? .dark : .default
}
}
``` | /content/code_sandbox/Simplenote/Classes/UIKeyboardAppearance+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 60 |
```swift
//
// SPContactsManager.swift
// Simplenote
//
// Created by Jorge Leandro Perez on 12/23/16.
//
import Foundation
import Contacts
/// Contacts Helper
///
class SPContactsManager: NSObject {
/// Checks if we've got permission to access the Contacts Store, or not
///
@objc var authorized: Bool... | /content/code_sandbox/Simplenote/Classes/SPContactsManager.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 784 |
```swift
import Foundation
import UIKit
/// UITableViewCell Helpers
///
extension UITableViewCell {
enum SeparatorWidth {
case full
case standard
}
/// Returns a reuseIdentifier that matches the receiver's classname (non namespaced).
///
@objc
class var reuseIdentifier: String ... | /content/code_sandbox/Simplenote/Classes/UITableViewCell+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 135 |
```swift
import Foundation
import UIKit
// MARK: - Bundle: Simplenote Methods
//
extension Bundle {
/// Returns the Bundle Short Version String.
///
@objc
var shortVersionString: String {
let version = infoDictionary?[Keys.shortVersionString] as? String
return version ?? ""
}
}
ex... | /content/code_sandbox/Simplenote/Classes/Bundle+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 289 |
```objective-c
//
// SPTableViewController.m
// Simplenote
//
// Created by Tom Witkin on 10/13/13.
//
#import "SPTableViewController.h"
#import "Simplenote-Swift.h"
@implementation SPTableViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self applyStyle];
}
- (void)applyStyle {
s... | /content/code_sandbox/Simplenote/Classes/SPTableViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 375 |
```objective-c
//
// NSString+Attributed.h
// Simplenote
//
// Created by Tom Witkin on 9/2/13.
//
#import <Foundation/Foundation.h>
@interface NSString (Attributed)
- (NSAttributedString *)attributedString;
- (NSMutableAttributedString *)mutableAttributedString;
@end
``` | /content/code_sandbox/Simplenote/Classes/NSString+Attributed.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 62 |
```objective-c
//
// SPRatingsHelper.m
// Simplenote
//
// Created by Jorge Leandro Perez on 3/19/15.
//
#import "SPRatingsHelper.h"
#import "SPAppDelegate.h"
#import "SPConstants.h"
#import "Settings.h"
#import "Simplenote-Swift.h"
@implementation SPRatingsHelper
- (void)reloadSettings
{
Simperium *simperiu... | /content/code_sandbox/Simplenote/Classes/SPRatingsHelper.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 302 |
```swift
import UIKit
// MARK: - PopoverViewController
//
class PopoverViewController: UIViewController {
/// Container view
///
@IBOutlet private var containerView: UIView!
@IBOutlet private var backgroundView: UIVisualEffectView!
@IBOutlet private var shadowView: SPShadowView!
/// Layout Co... | /content/code_sandbox/Simplenote/Classes/PopoverViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 617 |
```objective-c
//
// NSManagedObjectContext+CoreDataExtensions.m
// Castaway
//
// Created by Tom Witkin on 4/5/13.
//
#import "NSManagedObjectContext+CoreDataExtensions.h"
@implementation NSManagedObjectContext (CoreDataExtensions)
- (NSArray *)fetchAllObjectsForEntityName:(NSString *)entityName {
retur... | /content/code_sandbox/Simplenote/Classes/NSManagedObjectContext+CoreDataExtensions.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 902 |
```swift
import Foundation
import CoreSpotlight
// MARK: - Overridden Methods
//
extension SPNoteEditorViewController {
/// Whenever this instance is removed from its NavigationController, let's cleanup
///
override public func willMove(toParent parent: UIViewController?) {
super.willMove(toParent... | /content/code_sandbox/Simplenote/Classes/SPNoteEditorViewController+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 7,089 |
```swift
import Foundation
import UIKit
/// Adopters of this protocol will recieve interactive keyboard-based notifications
/// by implmenting the provided functions within.
///
public protocol KeyboardObservable: AnyObject {
/// Called during a Keyboard Repositioning Notification.
///
/// - Parameters:
... | /content/code_sandbox/Simplenote/Classes/KeyboardObservable.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 847 |
```objective-c
//
// SPEntryListViewController.m
// Simplenote
//
// Created by Tom Witkin on 8/19/13.
//
#import "SPEntryListViewController.h"
#import "Simplenote-Swift.h"
#import "SPEntryListCell.h"
#import "SPEntryListAutoCompleteCell.h"
static NSString *cellIdentifier = @"primaryCell";
static NSString *autoCom... | /content/code_sandbox/Simplenote/Classes/SPEntryListViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,111 |
```swift
import Foundation
import UIKit
/// UITableViewHeaderFooterView Helpers
///
extension UITableViewHeaderFooterView {
/// Returns a reuseIdentifier that matches the receiver's classname (non namespaced).
///
@objc
class var reuseIdentifier: String {
return classNameWithoutNamespaces
... | /content/code_sandbox/Simplenote/Classes/UITableViewHeaderFooterView+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 60 |
```swift
import Foundation
import UIKit
// MARK: - SearchDisplayController Delegate Methods
//
@objc
protocol SearchDisplayControllerDelegate: NSObjectProtocol {
func searchDisplayControllerShouldBeginSearch(_ controller: SearchDisplayController) -> Bool
func searchDisplayController(_ controller: SearchDisplay... | /content/code_sandbox/Simplenote/Classes/SearchDisplayController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,143 |
```objective-c
//
// SPMarkdownParser.m
// Simplenote
//
// Created by James Frost on 01/10/2015.
//
#import "SPMarkdownParser.h"
#import "html.h"
#import "Simplenote-Swift.h"
@implementation SPMarkdownParser
+ (NSString *)renderHTMLFromMarkdownString:(NSString *)markdown
{
hoedown_renderer *renderer = hoedo... | /content/code_sandbox/Simplenote/Classes/SPMarkdownParser.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 717 |
```swift
import Foundation
// MARK: - UIScreen Simplenote Methods
//
extension UIScreen {
/// Returns the ratio between 1 point and 1 pixel in the current device.
///
@objc
var pointToPixelRatio: CGFloat {
return 1 / scale
}
}
``` | /content/code_sandbox/Simplenote/Classes/UIScreen+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 61 |
```swift
import Foundation
// MARK: - Simplenote Extension
//
extension DateFormatter {
/// Shared DateFormatters
///
static let listDateFormatter: DateFormatter = {
let formatter = DateFormatter()
formatter.dateStyle = .short
formatter.timeStyle = .none
return formatter
... | /content/code_sandbox/Simplenote/Classes/DateFormatter+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 140 |
```objective-c
#import <Foundation/Foundation.h>
#import <Simperium/Simperium.h>
#import "Preferences.h"
@interface Simperium (Simplenote)
- (nonnull Preferences *)preferencesObject;
@end
``` | /content/code_sandbox/Simplenote/Classes/Simperium+Simplenote.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 43 |
```swift
import UIKit
// MARK: - SPNoteHistoryViewController: Shows history for a note
//
class SPNoteHistoryViewController: UIViewController {
@IBOutlet private weak var dateLabel: UILabel!
@IBOutlet private weak var errorMessageLabel: UILabel!
@IBOutlet private weak var slider: SPSnappingSlider!
@IBO... | /content/code_sandbox/Simplenote/Classes/SPNoteHistoryViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,895 |
```swift
//
// SPDefaultTableViewCell.swift
// Simplenote
//
//
import Foundation
// MARK: - UITableViewCell with the `.default` Style
//
class SPDefaultTableViewCell: UITableViewCell {
/// UITableView's Reusable Identifier
///
static let reusableIdentifier = "SPDefaultTableViewCell"
/// Designate... | /content/code_sandbox/Simplenote/Classes/SPDefaultTableViewCell.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 232 |
```swift
import Foundation
// MARK: - Represents all of the possible Sort Modes
//
@objc
enum SortMode: Int, CaseIterable {
/// Order: A-Z
///
case alphabeticallyAscending
/// Order: Z-A
///
case alphabeticallyDescending
/// Order: Newest on Top
///
case createdNewest
/// Or... | /content/code_sandbox/Simplenote/Classes/SortMode.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 315 |
```swift
import Foundation
import UIKit
// MARK: - UIColor Simplenote's Helpers
//
extension UIColor {
/// Returns an UIImage representation of the receiver, with the specified size, and Dark Mode support.
///
func dynamicImageRepresentation(size: CGSize = CGSize(width: 1, height: 1)) -> UIImage {
... | /content/code_sandbox/Simplenote/Classes/UIColor+Helpers.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 419 |
```swift
import Foundation
// MARK: - String
//
extension String {
/// Newline
///
static let newline = "\n"
/// String containing a Space
///
static let space = " "
/// Tabs
///
static let tab = "\t"
}
// MARK: - Helper API(s)
//
extension String {
/// Returns the Range en... | /content/code_sandbox/Simplenote/Classes/String+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,293 |
```objective-c
//
// PersonTag.h
// Simplenote
//
// Created by Michael Johnston on 11-08-23.
//
#import <Foundation/Foundation.h>
@interface PersonTag : NSObject
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *email;
@property (nonatomic) BOOL active;
- (instancetype)initWithNa... | /content/code_sandbox/Simplenote/Classes/PersonTag.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 118 |
```objective-c
#import <UIKit/UIKit.h>
#import <Simperium/Simperium.h>
@class InterlinkProcessor;
@class Note;
@class SPBlurEffectView;
@class SPEditorTextView;
@class SPTagView;
@class SearchMapView;
@class NoteEditorTagListViewController;
@class NoteScrollPositionCache;
NS_ASSUME_NONNULL_BEGIN
@interface SPNoteEd... | /content/code_sandbox/Simplenote/Classes/SPNoteEditorViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 580 |
```objective-c
#import "Simplenote-Swift.h"
#import "SPTransitionController.h"
#import "SPMarkdownPreviewViewController.h"
#import "SPInteractivePushPopAnimationController.h"
NSString *const SPTransitionControllerPopGestureTriggeredNotificationName = @"SPTransitionControllerPopGestureTriggeredNotificationName";
#p... | /content/code_sandbox/Simplenote/Classes/SPTransitionController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 892 |
```swift
import Foundation
// MARK: - InterlinkProcessorDelegate
//
protocol InterlinkProcessorDelegate: NSObjectProtocol {
/// Invoked whenever an Autocomplete Row has been selected: The handler should insert the specified text at a given range
///
func interlinkProcessor(_ processor: InterlinkProcessor,... | /content/code_sandbox/Simplenote/Classes/InterlinkProcessor.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,148 |
```swift
import Foundation
// MARK: - Note
//
extension Note {
/// Indicates if the receiver is a blank document
///
@objc
var isBlank: Bool {
objectID.isTemporaryID && content?.count == .zero && tagsArray?.count == .zero
}
/// Returns the Creation / Modification date for a given Sort... | /content/code_sandbox/Simplenote/Classes/Note+Properties.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 747 |
```swift
import Foundation
import UIKit
// MARK: - NSMutableAttributedString Methods
//
extension NSMutableAttributedString {
/// Returns the (foundation) associated NSString
///
var foundationString: NSString {
string as NSString
}
/// Appends a given String with the specified Foreground... | /content/code_sandbox/Simplenote/Classes/NSMutableAttributedString+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 295 |
```swift
import Foundation
import UIKit
// MARK: - SPPlaceholderView
//
@objc
class SPPlaceholderView: UIView {
/// DisplayMode: Defines the way in which the Placeholder behaves
///
enum DisplayMode {
case generic
case pictureAndText(imageName: UIImageName, text: String)
case text(... | /content/code_sandbox/Simplenote/Classes/SPPlaceholderView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 963 |
```objective-c
#import "SPNoteEditorViewController.h"
#import "Note.h"
#import "SPAppDelegate.h"
#import "SPNoteListViewController.h"
#import "SPEditorTextView.h"
#import "SPObjectManager.h"
#import "SPAddCollaboratorsViewController.h"
#import "JSONKit+Simplenote.h"
#import "UITextView+Simplenote.h"
#import "SPObjectMa... | /content/code_sandbox/Simplenote/Classes/SPNoteEditorViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 6,270 |
```swift
import Foundation
import UIKit
// MARK: - Simplenote Methods
//
extension UIContextualAction {
/// Initializes a Contextual Action with the specified parameters
///
convenience init(style: UIContextualAction.Style,
title: String? = nil,
image: UIImage? = ... | /content/code_sandbox/Simplenote/Classes/UIContextualAction+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 111 |
```objective-c
//
// SPEditorTextView.m
// Simplenote
//
// Created by Tom Witkin on 8/16/13.
//
#import "SPEditorTextView.h"
#import "SPInteractiveTextStorage.h"
#import "NSMutableAttributedString+Styling.h"
#import "Simplenote-Swift.h"
NSString *const MarkdownUnchecked = @"- [ ]";
NSString *const MarkdownChecked... | /content/code_sandbox/Simplenote/Classes/SPEditorTextView.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 4,066 |
```swift
import Foundation
// MARK: - Simplenote's User Activities
//
enum ActivityType: String {
/// Launch Simplenote Activity
///
case launch = "com.codality.NotationalFlow.launch"
/// New Note Activity
///
case newNote = "com.codality.NotationalFlow.newNote"
case newNoteShortcut = "Op... | /content/code_sandbox/Simplenote/Classes/ActivityType.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 144 |
```swift
import UIKit
// MARK: - UIScrollView
//
extension UIScrollView {
/// Returns an offset that is checked against min and max offset
///
func boundedContentOffset(from offset: CGPoint) -> CGPoint {
let minXOffset = -adjustedContentInset.left
let minYOffset = -adjustedContentInset.top... | /content/code_sandbox/Simplenote/Classes/UIScrollView+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 136 |
```objective-c
//
// UIImage+Colorization.m
//
// Created by Tom Witkin on 1/13/13.
//
#import "UIImage+Colorization.h"
@implementation UIImage (Colorization)
- (UIImage *)imageWithOverlayColor:(UIColor *)color
{
CGRect rect = CGRectMake(0.0f, 0.0f, self.size.width, self.size.height);
CGFloat imageSca... | /content/code_sandbox/Simplenote/Classes/UIImage+Colorization.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 183 |
```objective-c
//
// SPTagTextView.m
// Simplenote
//
// Created by Tom Witkin on 7/24/13.
//
#import "SPTagEntryField.h"
#import "Simplenote-Swift.h"
CGFloat const TagEntryFieldPadding = 40;
@implementation SPTagEntryField
- (instancetype)init
{
self = [super init];
if (self) {
self.backgroundCo... | /content/code_sandbox/Simplenote/Classes/SPTagEntryField.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 484 |
```objective-c
#import <UIKit/UIKit.h>
#import "SPTransitionController.h"
#import "SPSidebarContainerViewController.h"
#import "Note.h"
@class SPBlurEffectView;
@class SPPlaceholderView;
@class SPSortBar;
@class NotesListController;
@class SearchDisplayController;
@interface SPNoteListViewController : UIViewControlle... | /content/code_sandbox/Simplenote/Classes/SPNoteListViewController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 447 |
```swift
import UIKit
class SPSimpleTextPrintFormatter: UISimpleTextPrintFormatter {
override init(text: String) {
super.init(text: text)
// Check for darkmode
// If dark mode is enabled change the text color to black before printing
if SPUserInterface.isDark {
self.col... | /content/code_sandbox/Simplenote/Classes/SPSimpleTextPrintFormatter.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 76 |
```swift
import Foundation
// MARK: - UINavigationController Simplenote API
//
extension UINavigationController {
/// Returns the first Child ViewController of the specified Type
///
func firstChild<T: UIViewController>(ofType type: T.Type) -> T? {
for child in children where child is T {
... | /content/code_sandbox/Simplenote/Classes/UINavigationController+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 77 |
```swift
import Foundation
// MARK: - UINavigationBar + Appearance
//
extension UINavigationBar {
/// Applies the Simplenote Appearance to `UINavigationBar` instances
///
class func refreshAppearance() {
let clearImage = UIImage()
let apperance = UINavigationBar.appearance(whenContainedInI... | /content/code_sandbox/Simplenote/Classes/UINavigationBar+Appearance.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 172 |
```objective-c
#import "SPNoteListViewController.h"
#import "SPSettingsViewController.h"
#import "SPNavigationController.h"
#import "SPNoteEditorViewController.h"
#import "SPAppDelegate.h"
#import "SPTransitionController.h"
#import "SPTextView.h"
#import "SPObjectManager.h"
#import "SPTracker.h"
#import "SPRatingsHelp... | /content/code_sandbox/Simplenote/Classes/SPNoteListViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 4,903 |
```swift
import UIKit
// MARK: - TagListTextField
//
class TagListTextField: UITextField {
override func paste(_ sender: Any?) {
pasteTag()
}
}
``` | /content/code_sandbox/Simplenote/Classes/TagListTextField.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 37 |
```objective-c
//
// SPNotifications.m
// Simplenote
//
//
#import "SPNotifications.h"
#pragma mark ================================================================================
#pragma mark Notifications
#pragma mark ================================================================================
NSString *co... | /content/code_sandbox/Simplenote/Classes/SPNotifications.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 144 |
```objective-c
//
// SPEditorTextView.h
// Simplenote
//
// Created by Tom Witkin on 8/16/13.
//
#import "SPTextView.h"
@protocol SPEditorTextViewDelegate <UITextViewDelegate>
- (void)textView:(UITextView *)textView receivedInteractionWithURL:(NSURL *)url;
@end
@interface SPEditorTextView : SPTextView
@property... | /content/code_sandbox/Simplenote/Classes/SPEditorTextView.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 277 |
```objective-c
#import "NSString+Metadata.h"
@implementation NSString (Metadata)
- (NSArray *)stringArray {
NSMutableArray *list = [NSMutableArray arrayWithArray: [self componentsSeparatedByString:@" "]];
NSMutableArray *discardedItems = [NSMutableArray array];
NSString *str;
for (str in list) {
if ([str leng... | /content/code_sandbox/Simplenote/Classes/NSString+Metadata.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 101 |
```swift
import Foundation
import SimplenoteFoundation
// MARK: - InterlinkResultsController
//
class InterlinkResultsController {
/// ResultsController: In charge of CoreData Queries!
///
private let resultsController: ResultsController<Note>
/// Limits the maximum number of results to fetch
///... | /content/code_sandbox/Simplenote/Classes/InterlinkResultsController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 533 |
```swift
import Foundation
import UIKit
import SafariServices
import SwiftUI
// MARK: - SPOnboardingViewController
//
class SPOnboardingViewController: UIViewController, SPAuthenticationInterface {
/// Message: Container View
///
@IBOutlet var messageView: UIView!
/// Message: Text Label
///
... | /content/code_sandbox/Simplenote/Classes/SPOnboardingViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,718 |
```swift
import Foundation
// MARK: - FileStorage
//
class FileStorage<T: Codable> {
private let fileURL: URL
private lazy var decoder = JSONDecoder()
private lazy var encoder = JSONEncoder()
init(fileURL: URL) {
self.fileURL = fileURL
}
/// Load an object
///
func load() thr... | /content/code_sandbox/Simplenote/Classes/FileStorage.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 145 |
```objective-c
//
// SPInteractivePushPopAnimationController.h
// Simplenote
//
// Created by James Frost on 08/10/2015.
//
#import <UIKit/UIKit.h>
@class SPInteractivePushPopAnimationController;
@protocol SPInteractivePushViewControllerProvider <NSObject>
- (UIViewController *)nextViewControllerForInteractivePus... | /content/code_sandbox/Simplenote/Classes/SPInteractivePushPopAnimationController.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 275 |
```swift
import UIKit
// MARK: - TagViewDelegate
//
protocol TagViewDelegate: AnyObject {
func tagView(_ tagView: TagView, wantsToCreateTagWithName name: String)
func tagView(_ tagView: TagView, wantsToRemoveTagWithName name: String)
func tagViewDidBeginEditing(_ tagView: TagView)
func tagViewDidChang... | /content/code_sandbox/Simplenote/Classes/TagView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,958 |
```swift
import Foundation
// MARK: - UIActivity <> WordPress iOS!
//
extension UIActivity.ActivityType {
/// WordPress Draft Extension (AppStore)
///
static var wordPressDraftAppStore: UIActivity.ActivityType {
return UIActivity.ActivityType("org.wordpress.WordPressDraftAction")
}
/// Wo... | /content/code_sandbox/Simplenote/Classes/UIActivity+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 263 |
```objective-c
//
// SPSimperiumManager.h
// Simplenote
//
// Created by Tom Witkin on 7/26/13.
//
#import <Foundation/Foundation.h>
@class Note;
@class Tag;
NS_ASSUME_NONNULL_BEGIN
@interface SPObjectManager : NSObject
+ (SPObjectManager *)sharedManager;
- (NSArray<Note *> *)notes;
- (NSArray<Tag *> *)tags;
... | /content/code_sandbox/Simplenote/Classes/SPObjectManager.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 337 |
```objective-c
#import "NSString+Condensing.h"
@implementation NSString (Condensing)
- (NSString *)stringByReplacingNewlinesWithSpaces
{
if (self.length == 0) {
return self;
}
// Newlines: \n *AND* \r's!
NSMutableArray *components = [[self componentsSeparatedByCharactersInSet:[NSCharacterSet ... | /content/code_sandbox/Simplenote/Classes/NSString+Condensing.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 124 |
```swift
import Foundation
import UIKit
// MARK: - SPDiagnosticsViewController
//
class SPDiagnosticsViewController: UIViewController {
/// Label: Title
///
@IBOutlet private var titleLabel: UILabel!
/// TextView: Details
///
@IBOutlet private var detailsTextView: UITextView!
/// Text to... | /content/code_sandbox/Simplenote/Classes/SPDiagnosticsViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 422 |
```swift
//
// CSSearchableItem+Helpers.swift
// Simplenote
//
// Created by Michal Kosmowski on 25/11/2016.
//
import Foundation
import CoreSpotlight
import MobileCoreServices
import UniformTypeIdentifiers
extension CSSearchableItemAttributeSet {
convenience init(note: Note) {
self.init(contentType: ... | /content/code_sandbox/Simplenote/Classes/CSSearchable+Helpers.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 577 |
```swift
import Foundation
// MARK: - NotesListSection
//
struct NotesListSection {
/// Section Title
///
let title: String?
/// Section Objects
///
let objects: [Any]
/// Returns the number of Objects in the current section
///
var numberOfObjects: Int {
objects.count
... | /content/code_sandbox/Simplenote/Classes/NotesListSection.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 93 |
```swift
import Foundation
// MARK: - UITableView Simplenote Methods
//
extension UITableView {
/// Applies Simplenote's Style for Grouped TableVIews
///
@objc
func applySimplenoteGroupedStyle() {
backgroundColor = .simplenoteTableViewBackgroundColor
separatorColor = .simplenoteDivider... | /content/code_sandbox/Simplenote/Classes/UITableView+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,203 |
```swift
import Foundation
import UIKit
import SafariServices
import SwiftUI
import SimplenoteEndpoints
// MARK: - SPAuthViewController
//
class SPAuthViewController: UIViewController {
/// # Links to the StackView and the container view
///
@IBOutlet private var stackViewTopConstraint: NSLayoutConstrain... | /content/code_sandbox/Simplenote/Classes/SPAuthViewController.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 6,471 |
```swift
import UIKit
// MARK: - TagViewCell
//
class TagViewCell: RoundedView {
private var stackViewConstraints: EdgeConstraints!
private let stackView: UIStackView = {
let stackView = UIStackView()
stackView.alignment = .center
stackView.distribution = .fill
stackView.axis ... | /content/code_sandbox/Simplenote/Classes/TagViewCell.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,030 |
```swift
import Foundation
// MARK: - UIPasteboard + Interlink
//
extension UIPasteboard {
/// Copies the Internal Link (Markdown Reference) into the OS Pasteboard
///
func copyInternalLink(to note: Note) {
guard let link = note.markdownInternalLink else {
return
}
str... | /content/code_sandbox/Simplenote/Classes/UIPasteboard+Note.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 126 |
```objective-c
//
// Tag.m
// Simplenote
//
// Created by Michael Johnston on 10-04-19.
//
#import "Tag.h"
//#import "NSArray+Utilities.h"
#import "JSONKit+Simplenote.h"
@interface Tag()
- (void)updateRecipients;
@end
@implementation Tag
@synthesize count;
@dynamic index;
@dynamic share;
@dynamic name;
- (void)a... | /content/code_sandbox/Simplenote/Classes/Tag.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 543 |
```swift
import Foundation
import UIKit
// MARK: - SPSortBar
//
class SPSortBar: UIView {
/// Background Blur
///
private let blurView = SPBlurEffectView.navigationBarBlurView()
/// Divider: Top separator
///
@IBOutlet private(set) var dividerView: UIView!
/// Divider: We're aiming at a ... | /content/code_sandbox/Simplenote/Classes/SPSortBar.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 676 |
```objective-c
#import "SPNavigationController.h"
#import "Simplenote-Swift.h"
static const NSInteger SPNavigationBarBackgroundPositionZ = -1000;
@interface SPNavigationController ()
@property (nonatomic, strong) SPBlurEffectView *navigationBarBackground;
@end
@implementation SPNavigationController
#pragma mark... | /content/code_sandbox/Simplenote/Classes/SPNavigationController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 610 |
```swift
import Foundation
import SimplenoteSearch
// MARK: - NotesListState
//
enum NotesListState: Equatable {
case results
case searching(query: SearchQuery)
}
// MARK: - NotesListState: Public API
//
extension NotesListState {
/// Indicates if the NotesList should display Note Entities for the curren... | /content/code_sandbox/Simplenote/Classes/NotesListState.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 822 |
```swift
import Foundation
import UIKit
// MARK: - SPRatingsPromptDelegate
//
@objc
protocol SPRatingsPromptDelegate: AnyObject {
func simplenoteWasLiked()
func simplenoteWasDisliked()
func displayReviewUI()
func displayFeedbackUI()
func dismissRatingsUI()
}
// MARK: - SPRatingsPromptView
//
class... | /content/code_sandbox/Simplenote/Classes/SPRatingsPromptView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,212 |
```swift
import Foundation
// MARK: - NSMutableAttributedString Simplenote Methods
//
extension NSAttributedString {
/// Returns the full range of the receiver.
///
@objc
var fullRange: NSRange {
NSRange(location: .zero, length: length)
}
}
``` | /content/code_sandbox/Simplenote/Classes/NSAttributedString+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 56 |
```swift
import Foundation
/// This extension contains several helper-additions to Cocoa NSURL class.
///
extension NSURL {
/// Returns *true* if the current URL is HTTP or HTTPS
///
@objc func containsHttpScheme() -> Bool {
return scheme == "http" || scheme == "https"
}
}
``` | /content/code_sandbox/Simplenote/Classes/NSURL+Extensions.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 65 |
```swift
import Foundation
// MARK: - SPTextInputViewDelegate
//
@objc
protocol SPTextInputViewDelegate: NSObjectProtocol {
@objc optional
func textInputDidBeginEditing(_ textInput: SPTextInputView)
@objc optional
func textInputDidEndEditing(_ textInput: SPTextInputView)
@objc optional
func ... | /content/code_sandbox/Simplenote/Classes/SPTextInputView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,807 |
```swift
import Foundation
import UIKit
import SimplenoteInterlinks
// MARK: - UITextView State
//
extension UITextView {
/// Indicates if the receiver contains selected text
///
@objc
var isTextSelected: Bool {
return selectedRange.length > 0
}
/// Indicates if there's an ongoing Und... | /content/code_sandbox/Simplenote/Classes/UITextView+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,271 |
```swift
import UIKit
// MARK: RoundedCrossButton
//
class RoundedCrossButton: RoundedButton {
/// Style
///
enum Style {
case standard
case blue
case tagPill
}
var style: Style = .standard {
didSet {
refreshStyle()
}
}
override init(fr... | /content/code_sandbox/Simplenote/Classes/RoundedCrossButton.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 438 |
```swift
import Foundation
import UIKit
// MARK: - SPBlurEffectView: Reacts automatically to UserInterfaceStyle Changes
//
@objc
class SPBlurEffectView: UIVisualEffectView {
/// Blur's TintView
///
private let tintView: UIView = {
let output = UIView()
output.autoresizingMask = [.flexibleW... | /content/code_sandbox/Simplenote/Classes/SPBlurEffectView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 522 |
```swift
import Foundation
import UIKit
// MARK: - SPSectionHeaderView
//
@objcMembers
class SPSectionHeaderView: UITableViewHeaderFooterView {
/// View Containing all of the subviews
///
@IBOutlet private var containerView: UIView!
/// Override `textLabel` to add `@IBOutlet` annotation
///
@... | /content/code_sandbox/Simplenote/Classes/SPSectionHeaderView.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 483 |
```objective-c
//
// NSString+Bullets.h
// Simplenote
//
// Created by Tom Witkin on 8/25/13.
//
#import <Foundation/Foundation.h>
@interface NSString (Bullets)
+ (NSString *)spaceString;
+ (NSString *)tabString;
+ (NSString *)newLineString;
- (BOOL)isNewlineString;
- (BOOL)isTabString;
@end
``` | /content/code_sandbox/Simplenote/Classes/NSString+Bullets.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 84 |
```objective-c
//
// SPTextView.m
// Simplenote
//
// Created by Tom Witkin on 7/19/13.
// Created by Michael Johnston on 7/19/13.
//
#import "SPTextView.h"
#import <CoreFoundation/CFStringTokenizer.h>
#import "SPInteractiveTextStorage.h"
#import "Simplenote-Swift.h"
CGFloat const TextViewHighlightHorizontalPadd... | /content/code_sandbox/Simplenote/Classes/SPTextView.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,517 |
```swift
import Foundation
import UIKit
// MARK: - UISearchBar Simplenote Methods
//
extension UISearchBar {
/// Applies Simplenote's Style
///
@objc
func applySimplenoteStyle() {
backgroundColor = .clear
setBackgroundImage(UIImage(), for: .any, barMetrics: .default)
setSearchF... | /content/code_sandbox/Simplenote/Classes/UISearchBar+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 250 |
```swift
import Foundation
// MARK: - KeychainManager
//
enum KeychainManager {
/// Simplenote's Share Extension Token
///
@KeychainItemWrapper(service: SimplenoteKeychain.extensionService, account: SimplenoteKeychain.extensionAccount)
static var extensionToken: String?
/// Simplenote's PIN Lock ... | /content/code_sandbox/Simplenote/Classes/KeychainManager.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 458 |
```swift
import Foundation
import UIKit
// MARK: - UIAlertController's Simplenote Methods
//
extension UIViewController {
/// View to use to attach another view controller
///
enum AttachmentView {
case below(UIView)
case into(UIView)
}
/// Presents the receiver from the RootViewCo... | /content/code_sandbox/Simplenote/Classes/UIViewController+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 476 |
```objective-c
#import "SPModalActivityIndicator.h"
#import "Simplenote-Swift.h"
@implementation SPModalActivityIndicator
+ (SPModalActivityIndicator *)showInWindow:(UIWindow *)window {
SPModalActivityIndicator *alertView = [[SPModalActivityIndicator alloc] initWithFrame:CGRectZero];
UIActivityIndicato... | /content/code_sandbox/Simplenote/Classes/SPModalActivityIndicator.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 661 |
```objective-c
@interface NSProcessInfo (Util)
+ (BOOL)isRunningTests;
@end
``` | /content/code_sandbox/Simplenote/Classes/NSProcessInfo+Util.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 19 |
```objective-c
//
// SPNotifications.h
// Simplenote
//
//
#import <Foundation/Foundation.h>
#pragma mark ================================================================================
#pragma mark Notifications
#pragma mark ================================================================================
extern... | /content/code_sandbox/Simplenote/Classes/SPNotifications.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 97 |
```swift
import Foundation
// MARK: - NoteContentHelper
//
enum NoteContentHelper {
/// Returns structure of the content: range of title and body
///
/// - Parameters:
/// - content: note content
///
static func structure(of content: String?) -> (title: Range<String.Index>?, body: Range<St... | /content/code_sandbox/Simplenote/Classes/NoteContentHelper.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 479 |
```objective-c
//
// Note.h
// Simplenote
//
// Created by Michael Johnston on 01/07/08.
//
#import <Simperium/SPManagedObject.h>
@interface Note : SPManagedObject {
NSString *content;
NSString *modificationDatePreview;
NSString *creationDatePreview;
NSString *titlePrevi... | /content/code_sandbox/Simplenote/Classes/Note.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 796 |
```objective-c
#import "SPSidebarContainerViewController.h"
#import "SPTracker.h"
#import "Simplenote-Swift.h"
#import <UIKit/UIKit.h>
static const CGFloat SPDirectionalIdentity = 1;
static const CGFloat SPDirectionalInverted = -1;
static const CGFloat SPSidebarWidth ... | /content/code_sandbox/Simplenote/Classes/SPSidebarContainerViewController.m | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 3,368 |
```objective-c
//
// SPRatingsHelper.h
// Simplenote
//
// Created by Jorge Leandro Perez on 3/19/15.
//
#import "WPRatingsHelper.h"
@interface SPRatingsHelper : WPRatingsHelper
- (void)reloadSettings;
- (BOOL)shouldPromptForAppReview;
@end
``` | /content/code_sandbox/Simplenote/Classes/SPRatingsHelper.h | objective-c | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 70 |
```swift
import Foundation
import CoreSpotlight
import Intents
import MobileCoreServices
// MARK: - NSUserActivity Convenience Methods
//
extension NSUserActivity {
/// Initializes a UserActivity Instance with a given Activity Type
///
/// - Parameters:
/// - type: The Activity Type we're represen... | /content/code_sandbox/Simplenote/Classes/NSUserActivity+Simplenote.swift | swift | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 210 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.