Git Product home page Git Product logo

hsimagesidebarview's People

Contributors

bjhomer avatar dnstevenson avatar martijnvdwoude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hsimagesidebarview's Issues

horizontal scrolling

Hi,

How do I use this to do horizontal scrolling? I interchanged the width and height of the "Image Sidebar View" in the sample, but it does not show up.

Can you please help?

Thanks,
DS

Crash when non existing box is selected to delete.

I deleted all boxes and was able to select a row where there was no box any longer. Trying to delete this selection caused crash.
Quick and dirty check should prevent this case from crashing: if (selectedIndex != -1 && selectedIndex.row <= [colors count])

2011-06-14 09:58:39.957 Sidebar[2575:207] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSMutableArray removeObjectAtIndex:]: index 3 beyond bounds for empty array'
*** Call stack at first throw:
(
0 CoreFoundation 0x00f325a9 exceptionPreprocess + 185
1 libobjc.A.dylib 0x01086313 objc_exception_throw + 44
2 CoreFoundation 0x00f2b49f -[__NSArrayM removeObjectAtIndex:] + 415
3 Sidebar 0x0000226a -[SidebarViewController deleteSelection:] + 186
4 UIKit 0x001844fd -[UIApplication sendAction:to:from:forEvent:] + 119
5 UIKit 0x00214799 -[UIControl sendAction:to:forEvent:] + 67
6 UIKit 0x00216c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
7 UIKit 0x002157d8 -[UIControl touchesEnded:withEvent:] + 458
8 UIKit 0x001a8ded -[UIWindow _sendTouchesForEvent:] + 567
9 UIKit 0x00189c37 -[UIApplication sendEvent:] + 447
10 UIKit 0x0018ef2e _UIApplicationHandleEvent + 7576
11 GraphicsServices 0x01a7a992 PurpleEventCallback + 1550
12 CoreFoundation 0x00f13944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION
+ 52
13 CoreFoundation 0x00e73cf7 __CFRunLoopDoSource1 + 215
14 CoreFoundation 0x00e70f83 __CFRunLoopRun + 979
15 CoreFoundation 0x00e70840 CFRunLoopRunSpecific + 208
16 CoreFoundation 0x00e70761 CFRunLoopRunInMode + 97
17 GraphicsServices 0x01a791c4 GSEventRunModal + 217
18 GraphicsServices 0x01a79289 GSEventRun + 115
19 UIKit 0x00192c93 UIApplicationMain + 1160
20 Sidebar 0x00001b7e main + 126
21 Sidebar 0x00001af5 start + 53
)

Cells in addition to images

One thing I'd love to see is the ability to return cells in data source methods, in addition to UIImages, which are immutable and cannot update themselves. This would allow us to abstract logic about the content of each item out of the sidebar view and into the cell.

For example, a common idiom is to set a model property on a cell, which then sets up observers on the model's properties and updates the cell's subviews as appropriate when they change. The model object can asynchronously perform network or image processing operations, change it's image property to reflect these changes, then the cell can update the image independent of the sidebar view.

This is in contrast to putting all of this logic inside the sidebar view, then reloading the entire sidebar when the contents of an image changes.

To make this as simple as possible out of the box (and retain compatibility with existing code), you could check to see if the image variant of the data source method is implemented, create an image-only cell subclass behind the scenes and use it to populate the sidebar. Only users that needed cell functionality would implement the cell specific datasource method.

bug report

hey, thanks for your HSImageSidebarView,
there is something confusing , in the example project's Portrait mode, there are 6 icon,
but when it comes to Landscape mode,there are only 4 icon.
:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.