• Stars
    star
    267
  • Rank 153,621 (Top 4 %)
  • Language
    Objective-C
  • Created over 11 years ago
  • Updated almost 10 years ago

Reviews

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

Repository Details

ITSidebar is a control for Mac OS X similar to the one of Sparrow

ITSidebar

ITSidebar is outdated and thus shouldn't be used in new projects anymore. It heavily depends on NSMatrix and NSCell which are both soon to be deprecated. Just use an NSTableView or JNWCollectionView.

I'm planning on making a v2.0 of ITSidebar but that might take a while.


ITSidebar is a very lightweight control for Mac OS X. You can create sidebars similar to the one of Sparrow.

Why would I want to use this?

ITSidebar is:

  • Highly customizable
  • Lightning-fast
  • Completly free to use

Usage

Copy files

Copy the following files:

  • ITSidebar.h
  • ITSidebar.m
  • ITSidebarItemCell.h
  • ITSidebarItemCell.m
  • ITLeakWarningHelper.h

Make sure to copy them to the project, and to add them to the target. Please use your own images for the button cells.

Use in a project

Make sure to check out the sample project. First, drag a NSScrollView onto your window. Then, select the document view, and set its custom class to ITSidebar.

Now you can connect an outlet to it, and use the following methods:

// Add/Remove Cells
- (ITSidebarItemCell *)addItemWithImage:(NSImage *)image target:(id)target action:(SEL)action;
- (ITSidebarItemCell *)addItemWithImage:(NSImage *)image alternateImage:(NSImage *)alternateImage target:(id)target action:(SEL)action;

- (ITSidebarItemCell *)addItemWithImage:(NSImage *)image;
- (ITSidebarItemCell *)addItemWithImage:(NSImage *)image alternateImage:(NSImage *)alternateImage;

- (void)removeRow:(NSInteger)row;

// Select Cells
- (void)setSelectedIndex:(int)selectedIndex;
- (void)deselectAllItems;

// Customisation
- (void)setCellSize:(NSSize)cellSize;
- (void)setBackgroundColor:(NSColor *)backgroundColor;
- (void)setScrollerKnobStyle:(NSScrollerKnobStyle)knobStyle;

- (ITSidebarItemCell *)selectedItem;
- (int)selectedIndex;

+ (Class)sidebarItemCellClass;

For subclassing and customisation, check out the example.

License

Copyright (c) 2013 - 2014, Ilija Tovilo
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the organization nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ILIJA TOVILO BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Help

If you have any questions, feel free to let me know at [email protected]

More Repositories

1

ITSwitch

ITSwitch is a replica of UISwitch for Mac OS X
Objective-C
290
star
2

Pathfinder

A pathfinding library written in Swift
Swift
153
star
3

Pathbar

ITPathbar is a NSPathControl subclass, with a custom design.
Objective-C
130
star
4

ITProgressIndicator

A replacement class for `NSProgressIndicator` driven by Core Animation
Objective-C
117
star
5

ITPullToRefreshScrollView

ITPullToRefreshScrollView is a subclass of `NSScrollView` with iOS 7 style refreshing
Objective-C
103
star
6

ITProgressBar

ITProgressBar is a very lightweight progress bar replacement for Mac OS X
Objective-C
81
star
7

ITProgressBar-iOS

ITProgressBar is a simple iOS 7 style progress bar control.
Objective-C
46
star
8

ITSearchField

ITSearchField is a subclass of NSSearchField, which can collapse and expand if you click the search icon.
Objective-C
39
star
9

Conway-s-Game-of-Life

Conway's Game of Life written in Swift
Swift
36
star
10

ITNavigationView

A iOS like view driven by Core Animation, that can replace it's subview with a sleek animation
Objective-C
32
star
11

ITActivityIndicator

A very simple alternative to UIActivityIndicatorView
Swift
21
star
12

ITTransitionView

A port of ADTransitionController to Mac OS X
Objective-C
14
star
13

ITShortcutReader

Objective-C
9
star
14

2048

A clone of 2048 written with Cocos2d in Swift
Objective-C
6
star
15

Super-Mario-Bros

A super buggy version of Super Mario Bros. for iOS
Objective-C
5
star
16

Tetris

A simple Tetris game written in Swift
Swift
5
star
17

ViewControllerTest

Small NSViewController test for a question on Stackoverflow
Objective-C
4
star
18

zmk-config

Makefile
1
star
19

php-typealias-rfc

1
star
20

php-benchmark-data

1
star