Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete box display wrong direction and position. #13

Open
trungp opened this issue Apr 6, 2012 · 2 comments
Open

Autocomplete box display wrong direction and position. #13

trungp opened this issue Apr 6, 2012 · 2 comments

Comments

@trungp
Copy link

trungp commented Apr 6, 2012

Hi,

I've downloaded EgoTextView, it's great. It's a great textEditor I've ever seen. But I see a issue, if we can fix it, it's really fantastic.

  • The autoComplete box display wrong direction of word (from bottom to top), it display the suggestion word wrong direction.
  • When I change the font with new fontName and size, the autoComplete box display wrong direction and position.

Here is the code which I changed to EGOTextView_DemoViewController.m:

if (_egoTextView==nil) {

    EGOTextView *view = [[EGOTextView alloc] initWithFrame:self.view.bounds];
    view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    view.delegate = (id<EGOTextViewDelegate>)self;
    [self.view addSubview:view];
    self.egoTextView = view;
    self.egoTextView.font = [UIFont fontWithName:@"Helvetica" size:25.0f];
    [view release];  
    [view becomeFirstResponder];

}

I just set the font for egoTextView by this line:
self.egoTextView.font = [UIFont fontWithName:@"Helvetica" size:25.0f];

Then I run on iPad 5.0, when I write my text, the autoComplete box display wrong on both of direction and position.

The textEditor would be better if we can fix it.

Thanks in advance and waiting the fix.

@aimak
Copy link

aimak commented Feb 4, 2013

In case someone is looking for a solution. I'm not saying it is the best one, but that's all I could find after several hours, in EGOContentView implementation :

  • (void) layoutSubviews {
    [super layoutSubviews];

    for (CALayer * layer in self.layer.sublayers) {
    layer.geometryFlipped = YES;
    }

    [self.delegate textChanged]; // reset layout on frame / orientation change

}

@kamarshad
Copy link

thanks @aimak this works with charm but i am still having another issue with the autoComplete box origin.
This box displayed at wrong position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants