text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```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 |
```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 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orienta... | /content/code_sandbox/Simplenote/Classes/SignupVerificationViewController.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,935 |
```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 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orienta... | /content/code_sandbox/Simplenote/Classes/TagListViewCell.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 1,612 |
```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 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orienta... | /content/code_sandbox/Simplenote/Classes/SPSortBar.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,166 |
```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 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14854.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orien... | /content/code_sandbox/Simplenote/Classes/SPSheetController.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,834 |
```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 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="ipad9_7" o... | /content/code_sandbox/Simplenote/Classes/SPAuthViewController.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 6,264 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orienta... | /content/code_sandbox/Simplenote/Classes/PopoverViewController.xib | xml | 2016-08-11T15:55:22 | 2024-08-14T02:42:22 | simplenote-ios | Automattic/simplenote-ios | 2,038 | 2,034 |
```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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.