• Stars
    star
    446
  • Rank 97,888 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easy access to view's frame.

FrameAccessor

Build Status Coverage Status

Easy way to access view's frame in iOS and OSX.

Compatibility

  • iOS 4.3 or higher
  • OSX 10.6 or higher

Installation

Manual Install (preferred method)

Download framework for iOS or for OS X target and drag'n'drop into your project.

Add -ObjC -all_load to Other Linker Flags.

CocoaPods

Edit your Podfile and add FrameAccessor:

pod 'FrameAccessor'

Example Usage

view.x = 15.;
view.width = 167.;

instead of

CGRect newFrame = view.frame;
newFrame.origin.x = 15.;
newFrame.size.width = 167.;
view.frame = newFrame;

Available Properties

UIView/NSView properties:

Property Type Аvailability
viewOrigin CGPoint readwrite
viewSize CGSize readwrite
x, y CGFloat readwrite
width, height CGFloat readwrite
top, left, bottom, right CGFloat readwrite
centerX, centerY CGFloat readwrite
middlePoint CGPoint readonly
middleX, middleY CGFloat readonly

Note: the names of @viewOrigin and @viewSize properties are prefixed with view to not create conflicts with Apple's private internals (As discussed in #7).

UIScrollView properties:

Property Type Аvailability
contentOffsetX, contentOffsetY CGFloat readwrite
contentSizeWidth, contentSizeHeight CGFloat readwrite
contentInsetTop, contentInsetLeft,
contentInsetBottom, contentInsetRight
CGFloat readwrite

License

FrameAccessor is available under the MIT license.

Copyright (c) 2012 Alexey Denisov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
C
355
star
2

FontasticIcons

ObjC wrapper for the iconic fonts.
Objective-C
299
star
3

bitcode_retriever

Retrieves Bitcode from Mach-O binaries
C
178
star
4

ToyClangPlugin

Playing with Clang plugin system
C++
153
star
5

Vibro

Feel the network interaction
Objective-C
105
star
6

segment_dumper

Simple example of a Mach-O parser
C
103
star
7

xcconf

YAML-based configuration for ObjC projects
Objective-C
79
star
8

Fuzzer

Do not crash when your server lies
Objective-C
69
star
9

ModernStickies

Reverse Engineering Stickies.app
C
55
star
10

PrettyPasteboard

Converts plain JSON to a human readable format directly in pasteboard
Swift
39
star
11

Components

Systems are built from Components, not from Dependencies.
Makefile
26
star
12

cv

TeX
25
star
13

swift_llvm

How to use LLVM C API with Swift
Swift
24
star
14

sgl

SGL - Swift Generic Library. Highly inspired by C++ STL.
Swift
19
star
15

ToySwiftModule

Shows how to create and use pure Swift module
Swift
16
star
16

mutation-testing-poc

LLVM-based Mutation Testing System. Proof of concept
Objective-C
15
star
17

grape_doc

Ruby
13
star
18

LLVMTemplate

LLVM + Swift template Xcode project
Swift
12
star
19

SwiftKaleidoscope

Kaleidoscope language implemented in Swift.
Swift
8
star
20

mlir-tutorial

Terribly incorrect and incomplete AOT compiler for mRuby. Source code for the LLVM Social Berlin #20
C++
8
star
21

QuotePad

QuotePad that can be deployed on your server.
Ruby
7
star
22

QiOS

Set of Qt wrappers for native iOS stuff.
Objective-C
6
star
23

mbx

Supplementary material for my talk
LLVM
5
star
24

Tsuga

Set of helpers for pivotal/cedar
Objective-C
5
star
25

guard-calabash-ios

Guard gem for calabash-ios
Ruby
5
star
26

bm_lint

Playing with libclang
C
4
star
27

alexdenisov.github.io

Blog
HTML
4
star
28

mutation-lab

Some experiments related to https://github.com/mull-project/mull
C++
4
star
29

tdd_calc

Cedar/Calabash example for iOS.
Objective-C
3
star
30

LeafBridge

Madness!!1
Objective-C++
3
star
31

guard-frank

Guard gem for frank-cucumber
Ruby
3
star
32

ios_generate_settings

Generate settings manager Objective-C class from command ine
Ruby
3
star
33

Hasm

Assembler for http://www.nand2tetris.org
Objective-C
3
star
34

BindableTypes

Binding CocoaTouch controls to Foundation data types
Objective-C
2
star
35

dot_files

Vim Script
2
star
36

Cedar-installer

Useless from Aug 2012!!! Bash installation script for Cedar: BDD-style testing using Objective-C.
Shell
2
star
37

linux

Linux Kernel fork
C
1
star
38

articles

C
1
star