Giter Club home page Giter Club logo

prettykit's People

Contributors

echoz avatar sethgho avatar vicpenap 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  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

prettykit's Issues

PrettyTableViewCell

Xcode 6, iOS 8, using PrettyTableViewCell and the app is crashing related to KVO on line 481 -
any idea?

- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 
{
    if ([keyPath isEqualToString:@"frame"]) 
    {        
        UIView *contentView = (UIView *) object;
        CGRect originalFrame = contentView.frame;

        float shadowMargin = [self shadowMargin];

        float y = contentView_margin;
        switch (self.position) {
            case PrettyTableViewCellPositionTop:
            case PrettyTableViewCellPositionAlone:
                y += shadowMargin;
                break;
            default:
                break;
        }
        float diffY = y - originalFrame.origin.y;

        if (diffY != 0)
        {
            CGRect rect = CGRectMake(originalFrame.origin.x+shadowMargin,
                                     originalFrame.origin.y+diffY,
                                     originalFrame.size.width - shadowMargin*2,
                                     originalFrame.size.height- contentView_margin*2 - [PrettyTableViewCell neededHeightForPosition:self.position tableStyle:_tableViewStyle]);
            contentView.frame = rect; // --> crash here!
        }
    }
}

Example of a custom view cell

I think the example lacks the use of a PrettyCustomViewTableViewCell.

Specifically, I have a project where I use this class, and I haven't quite understood how to use it correctly. My cells contents aren't properly masked (the view goes out of the boundaries when there are rounded corners) and I haven't found a public property to set the view.

Could you enlighten me?

Inconsistent shadowing for grouped table view

The vertical shadow on the left of a grouped 'middle' PrettyTableViewCell is not consistent. It seems to be slightly rounded, as seen in this screenshot from the example app (with the background changed to white):
Screen Shot 2013-01-17 at 3 14 39 PM

It is less noticeable on the right side:
Screen Shot 2013-01-17 at 3 15 57 PM

This is pretty small but still noticeable.

Drop shadow not showing up

I've got a custom PrettyKitTableViewCell subclass which I'm trying to get a dropshadow on (grouped table view) and when i set the dropsShadow property to YES in cellForRowAtIndexPath no shadow is created. I'm still relatively new to iOS, so i'm just wondering if anyone can suggest some things I should check that I may have missed?

This is an iOS 5 - 6 app btw, using the latest version for download from this repo.

Thanks

PrettyTableViewCell cannot be released.

Thanks for the great library!!

I have one problem about memory management!

As title, when I use PrettyTableViewCell, it cannot be released.

I guess it's because of "[self.contentView addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionOld context:nil];"
The "[self.contentView removeObserver:self forKeyPath:@"frame"];" is in "dealloc" method, but without removing the cell cannot be dealloc.

Not sure if I was right.

Please check this.

Thanks a lot.

How to use PrettyNavigationBar

I didn't understand how do I use the navigation bar, I'm not using any xib files, so how do I change my navigation bar to be PrettyNavigationBar?

It doesn't work at searchDisplayController.searchResultsTableView

PrettyKit is very nice library, but It doesn't work at searchDisplayController.searchResultsTableView.

static NSString *CellIdentifier = @"Cell";
PrettyTableViewCell *ccell = (PrettyTableViewCell *)[self.searchDisplayController.searchResultsTableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (ccell == nil) {
  ccell = [[[PrettyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
  ccell.tableViewBackgroundColor = self.searchDisplayController.searchResultsTableView.backgroundColor; 
  ccell.textLabel.font = [UIFont fontWithName:@"Palatino-Roman" size:14];
}

[ccell prepareForTableView:self.searchDisplayController.searchResultsTableView indexPath:indexPath];
ccell.textLabel.text = @"test";   
if (indexPath.section == 0) {
  ccell.cornerRadius = 20;
}
else {
  ccell.cornerRadius = 10;
}

Any ideas? Thanks for your help.

PrettyTableViewCell subtitle problem

very pretty, thanks for the great job.

I wish to display detailLabel in prettytableviewcell, but the background of the detaillabel text was cleared so the background of the tableview is displayed. How can I solve the problem? thank you.

Inserting and removing PrettyTableViewCell rounded corners not being redrawn

So if you start with 1 row and insert a new row in a grouped table, the first row will have rounded corners on top, but the now second row still has the 4 rounded corners.

Similar issue when you delete the first row of a grouped table.

To fix, I guess I could reload the affected rows (in my tableviewcontroller) every time an insert/delete is done... but I wonder if there's a way PrettyTableViewCell can handle it automatically?

Arc version

Hil
The library is very nice , Will it have an arc version soon ???

Set selectedIndex for SegmentedControll Cell

Hi everyone,

I try to change the selectedIndex by default by [cell.selectedIndex or cell setSelectedIndex:1]

Both ways doesn't work. Has anyone a solution for this problem?

Best regards

Tim

Table with clear background has thick separators

Setting a table and the cells background colors to transparent shows some ugly separators in between the cells. For some reason there is space between each cell, and a UIView in between each with a pixel height of 1.
Screen Shot 2013-01-11 at 2 00 20 PM

Animation and the backgroundView. Ugly stretching

Hi

I'm having trouble getting animations to work with PrettyKit cells.

I want to animate the cells height when a user taps the cell.

When a user selects the cell i call

[tableView beginUpdates];
[tableView endUpdates];

And returns a different height in tableView:heightForRowAtIndexPath. This makes the cell animate to its new height.

All this works like a charm, but I'm having trouble with the resizing of the backgroundView. Currently the backgroundViews content stretches while the cell animates. This is not what i want and it looks horrible. I want the backgroundView to redraw its content during the animation. Is this possible, and if so, how?

I've illustrated the problem in the following image (don't mind the arrow in the cell, its my custom implementation. Same behaviour with unmodified PrettyKit cells).

Illustration.

Update:
I found out that this is what happens:

  1. The cell starts out as a big cell. Everything looks good and everyone is happy.
  2. The user clicks the cell.
  3. The backgroundView redraws for its new height.
  4. The cell animates and gets smaller. And therefore the background view is in a stretched state during the animation.

PrettyGridTableViewCell duplicate member _indexPath

Just a heads up, I'm not sure if this is a bug in XCode or what, but the newest NDAd XCode (DP3) is generating an error on line 99 that NSIndexPath *_indexPath; is a duplicate member, probably all the way back to UITableViewCell itself. Most likely a private property. I had to edit the .h and .m files and turned it into _indexPat, seems to have fixed it.

You'll have to keep watch for the next couple of preview releases to see if this continues

UIStoryboard Cells

Hi, looks like your awesome toolkit does not work out of the box with UIStoryboard created cells (and I doubt it will work with NIBs anyway because of missing awakeFromNIB). Therefore I wrote a little workaround that seems to fix the problem:

- (void)configureCell {
    if(_configured) {
        return;
    }
    _configured = YES;

    [self.contentView addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionOld context:nil];


    PrettyTableViewCellBackground *bg = [[PrettyTableViewCellBackground alloc] initWithFrame:self.frame 
                                                                                    behavior:CellBackgroundBehaviorNormal];
    bg.cell = self;
    self.backgroundView = bg;
    [bg release];

    bg = [[PrettyTableViewCellBackground alloc] initWithFrame:self.frame
                                                     behavior:CellBackgroundBehaviorSelected];
    bg.cell = self;
    self.selectedBackgroundView = bg;
    [bg release];

    [self initializeVars];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self configureCell];        
    }
    return self;
}

I added the call here too:

- (void) prepareForTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath 
{
    [self configureCell];
    _tableViewStyle = tableView.style;
    self.position = [PrettyTableViewCell positionForTableView:tableView indexPath:indexPath];
}

Hope this is somehow usefull.

Cheers,
Dirk

Separator shadow issue in grouped table

If you observe closely the place where the separator is drawn the shadow is broken. This happens even if the separator is not drawn. I am assuming this is some kind of margin between cells being drawn and its shadow path

App Crashing at line 317 in PrettyTableViewCell.m (SIGSEGV)

Hello everyone,

I use PrettyKit in one of my apps at the App Store. I have 500 active users and the app crash by some people (iPad 2, 3, 4 / iOS 5.1.1 - iOS 6.1.3).

0x00082903 -PrettyTableViewCellBackground drawRect:

Has everyone else the problem? I can't simulate the problem on my test devices.

PrettyKit Grid View Cell did Select?

Hi,

Can you tell me the cell selection in PrettyGridTableViewCell. I need to navigate the page to another page when i click the 1st cell of the PrettyGridTableViewCell. I searched the method but i did find that one. waiting for the reply

Thanks in Advance.

With Regards,

S.SriBharanidharan

Ipad Uitableview

Is there any way to have a pretty uitableview on iPad? The corners are squared on iPad Uitableview regardless of the corner radius.

Thanks in advance.

Contribution required usage changes

Hi vicpenap,
I actually planned to send you a private message but I did not find any way to do this so Im writing this post.

I am starting a new iOS application and I think PrettyKit is what i need for my application. My application requires animated insertion and deletion operations but PrettyKit is not support those operation as I see. I would love to make required enchantment on PrettyKit but my enchantments are changing usage of the PrettyKit a little bit.

Usage Changes;
1- User of this library will not need to call "prepareForTableView: indexPath:" method of PrettyTableViewCell under "tableView:cellForRowAtIndexPath:" method of UITableViewDelegate.
2- User needs to use a class named PrettyTableView instead UITableView

Enchantments;
1- PrettyKit will support adding and deleting cells with animation. (Corners of cells will animate like native UITableViewCell class).
2- PrettyCells can be designed in interfaceBuilder. (Their appearance will not be able to edited in interfaceBuilder but their content will be).

If you are okay with these changes I will upload my changes with their documentation soon.

Just Confused

I wanted to send this in a private message, but couldn't find how.. anyway, I'm just confused on this one thing. (and please bear with me because I'm rather new to coding)

In my app I have a tab bar and three views. I can implement the PrettyNavigationBar using interface builder in two out of the three views. The tableview is the one I am having trouble with. Is there a way i can implement a Prettynavbar inside a tableview using interface builder? -- I just can't figure out how..

Label with Textfield in one cell

This is not an issue but can you add a new cell that has a textfield with a label. I made a custom cell with the norma UITableView but i would like to use your code. I can't add the label + Textfield in your cell. I've tried a few thing.

ps. I don't care for the performance issue.

Thanks,

ThaAppleWizz

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.