8646444

所属分类:图形图像处理
开发工具:Objective-C
文件大小:66KB
下载次数:1
上传日期:2013-12-10 10:03:50
上 传 者uirrryyy
说明:  HS图像侧边栏查看iOS,精选ios学习编程源码,很好的参考资料。
(HS image sidebar to view the iOS, select IOS to learn programming source code, a good reference.)

文件列表:
HSImageSidebarView (0, 2012-05-04)
HSImageSidebarView\HSImageSidebarView.h (763, 2012-05-04)
HSImageSidebarView\HSImageSidebarView.m (22097, 2012-05-04)
HSImageSidebarView\HSImageSidebarViewDelegate.h (809, 2012-05-04)
LICENSE.txt (1054, 2012-05-04)
sampleImage.png (30824, 2012-05-04)
Sidebar (0, 2012-05-04)
Sidebar.xcodeproj (0, 2012-05-04)
Sidebar.xcodeproj\project.pbxproj (17000, 2012-05-04)
Sidebar.xcodeproj\project.xcworkspace (0, 2012-05-04)
Sidebar.xcodeproj\project.xcworkspace\contents.xcworkspacedata (152, 2012-05-04)
SidebarAdvanced (0, 2012-05-04)
SidebarAdvanced.xcodeproj (0, 2012-05-04)
SidebarAdvanced.xcodeproj\project.pbxproj (14336, 2012-05-04)
SidebarAdvanced.xcodeproj\project.xcworkspace (0, 2012-05-04)
SidebarAdvanced.xcodeproj\project.xcworkspace\contents.xcworkspacedata (160, 2012-05-04)
SidebarAdvanced\AppDelegate.h (281, 2012-05-04)
SidebarAdvanced\AppDelegate.m (2021, 2012-05-04)
SidebarAdvanced\BigLetterViewController.h (261, 2012-05-04)
SidebarAdvanced\BigLetterViewController.m (2190, 2012-05-04)
SidebarAdvanced\en.lproj (0, 2012-05-04)
SidebarAdvanced\en.lproj\InfoPlist.strings (45, 2012-05-04)
SidebarAdvanced\en.lproj\MainStoryboard.storyboard (5895, 2012-05-04)
SidebarAdvanced\main.m (331, 2012-05-04)
SidebarAdvanced\RootViewController.h (308, 2012-05-04)
SidebarAdvanced\RootViewController.m (2453, 2012-05-04)
SidebarAdvanced\SidebarAdvanced-Info.plist (1303, 2012-05-04)
SidebarAdvanced\SidebarAdvanced-Prefix.pch (327, 2012-05-04)
Sidebar\Blue.png (508, 2012-05-04)
Sidebar\DeleteImagePopoverController.xib (8673, 2012-05-04)
Sidebar\en.lproj (0, 2012-05-04)
Sidebar\en.lproj\InfoPlist.strings (45, 2012-05-04)
Sidebar\en.lproj\MainWindow.xib (19721, 2012-05-04)
Sidebar\en.lproj\SidebarViewController.xib (12339, 2012-05-04)
Sidebar\Green.png (507, 2012-05-04)
Sidebar\Red.png (512, 2012-05-04)
Sidebar\Sidebar-Info.plist (1473, 2012-05-04)
m (304, 2012-05-04)
... ...

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/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

近期下载者

相关文件


收藏者