Coder Social home page Coder Social logo

pxlistview's Introduction

hey, I'm alex ๐Ÿ‘‹

I'm a full-stack engineer and creative ๐Ÿ”ฎ

I've been building for the Apple ecosystem for a long time, in Objective-C/C++ and Swift, and for AppKit, UIKit and SwiftUI. I've always been driven to ship polished projects with clean APIs, and back in the day I built PXSourceList and PXListView which shipped in some pretty big apps, including early versions of Sketch.

These days I'm excited about Swift, SwiftUI and TypeScript, and am placing a focus on building out fun, interesting projects that make the most of all the incredible tools and technologies that are out there.

I've worked for various companies both big1 2 and small3 4, and I'm currently available for freelance projects ๐Ÿ™Œ

If you've ever used any of my open-sourced projects, tips are always appreciated ๐Ÿ™๐Ÿผ and you can also sponsor my work on GitHub

Buy Me A Coffee

Find me around the web:

pxlistview's People

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

pxlistview's Issues

Inertia Scrolling is Inconsistent

When scrolling with a trackpad, inertia scrolling works inconsistently as compared to other apps (see for example the Twitter App, or iTunes). Sometimes the list will continue to scroll with inertia, other times it will stop dead, with no inertia.

I'm going to spend some time digging into the code, so I'll see if I can figure out why this might be happening.

Drag and drop target indicator does not erase

I have a project that's using PXListView. It also allows for drag and drop of individual cells. The cells, when being dragged and dropped, in my case, cannot be dropped on another cell. Only on the spaces between the cells. So I have configured my delegate to return NO for PXListViewDropOn, and YES for the other drops, for the delegate method -listView:acceptDrop:row:dropHighlight:

This seems to work well, except that when I drag a cell down, and then bring it back up (without dropping it) the target indicator (the blue line that shows up between cells) persists on all cells I dragged over below the current cell.

So, in other words, I grab the top cell, and begin dragging down, I get a blue line between each set of other cells, as expected, and the blue line moves with my drag. If I change directions, and begin dragging up, the blue line follows me, but is not erased from the lower cells, so instead it leaves a blue line between all the cells.

You can find a sample project that reproduces this here:

http://www.random-ideas.net/Dropbox/ListViewTest.zip

Can't Drag & Drop

After upgraded to the latest version of PXListView, I found that I can no longer drag and drop now. Is this related to the new feature which allows to deselect a cell? Thanks.

Issue with row selection and scrolling

Steps to reproduce:

  1. Click on any row in the list view.
  2. Click anywhere on the uppermost row of pixels for the selected row.
  3. Try to scroll; it won't initially but will deselect then scroll again; move the mouse a bit then try again and it will.

Possibly related to drag and drop? On a couple of attempts I saw the green circle with a + which is shown when moving an item via drag and drop.

Rows disappear while deleting if delete from down to up

I added possibility to remove rows from the list. After every removing the list is reloading. If remove rows from up to down everything is fine. But if remove rows from down to up all rows are disappear when all rows count is equal to visible rows count.

Resizing the list view and scroll position

Resizing the list view alters the vertical scroll position, which changes the rows that are in view.

The behaviour should be to keep the vertical scroll offset the same after the list view has been resized.

Rapidly clicking the same row causes the UI to freeze

I find that whenever I rapidly click on the same cell, the entire UI of the application will freeze. Of course, this is not necessarily how the list view is meant to be used. Still, it would be great if this was not the case.

I have not managed to find the cause for this. Does anyone experience the same or even have a fix for this?

Updated Cocoapods

Preferably done via tags in the Github account, to easily see where the pod and repo sync up?

Double-click action?

Anyone thought about adding doubleAction support? Thought I'd check before adding it.. :)

Thanks

PXListView lose first Cell element when resizing parent view

I have a PXListView in a XIB, inside a NSView.
I'm using an animator to replace the current NSView with a new one like this:

[[container animator] replaceSubview:currentView with:myListView];

where myListView is the parent view of a PXListView.

When doing this,
after a window resizing, the PXListView lose the first cell element. If I color the list view background, I can see that the view has the right size and origin, but the first cell element disappears.
When scrolling the list view again, the first cell element, appears again (when scrolling down from the top of the window).

What is happening?

Pass mouse scroll events to superview

Hi,
Is it possible to have the PXListView refuse mouse scroll events and pass it to another view (another NSScrollView in my case)?
I have multiple PXListViews as subviews of a NSScrollView's documentView and I have them all resizing themselves automatically to show all the items. The idea is that the main NSScrollView will handled the scrolling down the page with all items visible in separate lists.
However, whenever I try to scroll with the cursor over a PXListView, nothing happens at all.

Memory leak while resizing the window

In the demo app (or any app using this code) some leaks appear in Instruments / Activity when you resize the window.

(Looks like the code allocs a LOT of cells on resize, without queuing / dequeuing and do not throw them away)

Please add LICENSE file

Please add a LICENSE file with the New BSD License, to make it obvious that the code is licensed under New BSD.

Binding PXListView to an Array Controller

I'm somewhat new to bindings โ€”ย I understand them enough to implement them on standard cocoa classes like NSTableView or NSCollectionView, but I'm not sure how to approach using them with PXListView.

Any tips on approach, i.e. what I could programmatically bind, what methods to implement, etc, to simulate NSCollectionView's binding behavior?

listView:heightOfRow: is called a gazillion times

Even with a modest number of rows (< 100) I get thousands of calls when scrolling, or even by just resizing the window without scrolling when usingLiveResize is set to YES.
Is that the intended behavior or am I doing something wrong?

Index of selected view

How does one find the number of the selected view ?

  • (void)listView:(JAListView *)listView didSelectView:(JAListViewItem *)view

This does not give the indexpath of the selected row. The demo app also does not do anything once a view is selected

Creating PXListView programmatically

I need to create the PXListView programmatically. I achieved to create the view and the rows, but scrolling is not working.

 searchListView = [[PXListView alloc] initWithFrame:NSMakeRect(origin.x, origin.y, size.width, size.height)];
 [searchListView setDelegate:self];
 [searchListView setCellSpacing:2.0f];
 [searchListView setAllowsEmptySelection:YES];
  [searchListView setAllowsMultipleSelection:NO];
//[searchListView registerForDraggedTypes:[NSArray arrayWithObjects: NSStringPboardType, nil]];

 PXListDocumentView *searchDocView = [[PXListDocumentView alloc] initWithFrame:NSMakeRect(origin.x, origin.y,    size.width, size.height)];
 [searchDocView setListView:searchListView];
 [searchListView setDocumentView:searchDocView];

 searchListItems = [[NSMutableArray alloc] init];

//Create a bunch of rows as a test
for( NSInteger i = 0; i < 10; i++ )
{
    NSString *title = [[NSString alloc] initWithFormat: @"Item %d", i +1];
    [searchListItems addObject:title];
    [title release];
}

[searchListView reloadData];

// just as a test I put the document view as the content view of a window   
[window setContentView:searchDocView];

What's wrong?

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.