HSImageSidebarView
==================
`HSImageSidebarView` is a subclass of `UIView` for displaying a collection of images.
The images are arranged either horizontally or vertically, depending on the
dimensions of the view. It supports selection, scrolling, drag-and-drop
rearranging, and drag-and-drop deletion. The API is patterned after `UITableView`,
so it will be familiar to Cocoa Touch programmers. HSImageSidebarView works with
both iPad and iPhone interface idioms.
![Sample screenshot](https://github.com/bjhomer/HSImageSidebarView/raw/master/Sample/sampleImage.png)
An `HSImageSidebarView` is created using the standard `initWithFrame:` method
on `UIView`.
// Create an 80-pixel sidebar on the left side of the screen
HSImageSidebarView *sidebar = [[HSImageSidebarView alloc] initWithFrame:CGRectMake(0, 0, 80, 1004)];
sidebar.delegate = self;
[parentView addSubview:sidebar];
[sidebar release];
It can also be created in Interface Builder by adding a `UIView` and then setting
its class (in IB) to `HSImageSidebarView`.
The image sidebar receives all its information through delegate methods. The
two required methods are these:
- (NSUInteger)countOfImagesInSidebar:(HSImageSidebarView *)sidebar;
- (UIImage *)sidebar:(HSImageSidebarView *)sidebar imageForIndex:(NSUInteger)anIndex;
When a user taps, moves, or deletes an image, the delegate can be notified through
one of these methods:
- (void)sidebar:(HSImageSidebarView *)sidebar didTapImageAtIndex:(NSUInteger)anIndex;
- (void)sidebar:(HSImageSidebarView *)sidebar didMoveImageAtIndex:(NSUInteger)oldIndex toIndex:(NSUInteger)newIndex;
- (void)sidebar:(HSImageSidebarView *)sidebar didRemoveImageAtIndex:(NSUInteger)anIndex;
`HSImageSidebarView` requires iOS 4.0 or later. A sample project is included to
demonstrate usage.
To Do
-----
The following are features which I would like to see added, but which haven't
been completed yet:
- Expose selection color property
- Enable/disable drag-to-move
- Enable/disable drag-to-delete
- Be smarter about calculating the image frame when the the aspect fit
doesn't fill the whole frame. (This mostly applies when trying to position
a popover correctly.)
- Add support for indentation levels
- Add support for numbering images
- Add support for multiple selection
没有合适的资源?快使用搜索试试~ 我知道了~
IOS应用源码之bjhomer-HSImageSidebarView-44c00dc.zip
共23个文件
m:4个
h:4个
png:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 156 浏览量
2022-06-21
08:39:57
上传
评论
收藏 56KB ZIP 举报
温馨提示
IOS应用源码之bjhomer-HSImageSidebarView-44c00dc.zip
资源推荐
资源详情
资源评论
收起资源包目录
IOS应用源码之bjhomer-HSImageSidebarView-44c00dc.zip (23个子文件)
bjhomer-HSImageSidebarView-44c00dc
.gitignore 26B
README.md 2KB
Resources
Green.png 507B
Sidebar-Info.plist 1KB
en.lproj
SidebarViewController.xib 12KB
MainWindow.xib 19KB
InfoPlist.strings 45B
Red.png 512B
DeleteImagePopoverController.xib 8KB
Blue.png 508B
Sample
SidebarViewController.h 541B
SidebarAppDelegate.m 769B
SidebarAppDelegate.h 467B
sampleImage.png 30KB
SidebarViewController.m 4KB
Sidebar-main.m 352B
Sidebar.xcodeproj
project.xcworkspace
contents.xcworkspacedata 152B
project.pbxproj 16KB
Sidebar-Prefix.pch 320B
LICENSE.txt 1KB
Classes
HSImageSidebarView.h 757B
HSImageSidebarViewDelegate.h 809B
HSImageSidebarView.m 22KB
共 23 条
- 1
资源评论
qq_38220914
- 粉丝: 605
- 资源: 4312
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功