* WARNING: This depends on undocumented APIs and may be fragile. For testing only.
*/
"
@implementation UITouch (TTCategory)- (id)initInView:(UIView *)view location:(CGPoint)location {if (self = [super init]) {_tapCount = 1; <= BAD_locationInWindow = location; <= BAD_previousLocationInWindow = location; <= BADUIView *target = [view.window hitTest:_locationInWindow withEvent:nil];_view = [target retain]; <= BAD_window = [view.window retain]; <= BAD_phase = UITouchPhaseBegan; <= BAD_touchFlags._firstTouchForView = 1; <= BAD_touchFlags._isTap = 1; <= BAD_timestamp = [NSDate timeIntervalSinceReferenceDate]; <= BAD}return self;}- (void)changeToPhase:(UITouchPhase)phase {_phase = phase; <= BAD_timestamp = [NSDate timeIntervalSinceReferenceDate]; <= BAD}@end
1. Delete the TTIsKeyboardVisible function in TTGlobal.h/m. Nothing
calls it.
2. Delete TTMessageController. It accounts for the majority of the
calls and MFMailComposeViewController in MessageUI basically makes it
obsolete.
3. Replace scrollFirstResponderIntoView in UITableViewAdditions with
this (or something similar):
-(void) scrollFirstResponderIntoView {
NSIndexPath *selectedRowIndexPath = [self indexPathForSelectedRow];
if (![[self indexPathsForVisibleRows]
containsObject:selectedRowIndexPath]) {
[self
scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionMiddle
animated:YES];
}
}
This breaks the TTTableControlItem... but they are kind broken in the
present form anyway so just add UITextFields directly to a
TTTableViewItem or don't use TTableItem/TTTableViewController for
views that need interaction. I would guesstimate that anything that
wants to scroll to TTStyledNode might be affected as well but can not
fathom where they might be used realistically other than a
TTStyledTextTableItemCell that might want to scroll to a particular
TTStyledNode subclass instance in its TTStyledTextLabel.
4. In frameWithKeyboardSubtracted in UIViewAdditions.m, Comment out
the line below (302 in e8ecb80) and the matching bracket:
if ([self.window performSelector:@selector(firstResponder)]) {
I removed these and the UITouch code from my own branch as soon as I
saw them, ages ago it seems now. I maintain my own branch manually,
incorporating changes by hand so that I am always aware of what is
going on inside the code. I did test them with the latest master,
e8ecb80, using TTCatalog. I found nothing that seemed broken aside
from scrolling for TTTableControlItem instances. There are prolly some
other issues... make the changes and report them back here. This is
what open source libraries are all about...
Apple needs to add an open source libraries and frameworks category to
the design awards at WWDC next year and Joe should win on iPhone OS
for Three20. That having been said, Three20 encompasses a number of
advanced concepts and anyone contemplating using it for production
applications, your own or for your clients or company, should take the
time to fully understand it.
Cheers,
David
That having been said, Three20 encompasses a number of
advanced concepts and anyone contemplating using it for production
applications, your own or for your clients or company, should take the
time to fully understand it.
//
// UIWindow+ttFirstResponder.h
// Three20
//
// Created by jonathan on 10/29/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIWindow (ttFirstResponder)
-(UIView *)ttFirstResponder;
@end
// UIWindow+ttFirstResponder.m
#import "UIWindow+ttFirstResponder.h"
UIView * recursiveFirstResponderSearchInView(UIView *viewToSearch)
{
UIView *fResponder = nil;
if([viewToSearch isFirstResponder])
{
return viewToSearch;
}
for (UIView *view in [viewToSearch subviews]) {
if([view isFirstResponder])
{
fResponder = view;
break;
}
UIView *someOtherView = recursiveFirstResponderSearchInView(view);
if([someOtherView isFirstResponder])
{
fResponder = someOtherView;
break;
}
}
return fResponder;
}
@implementation UIWindow (ttFirstResponder)
-(UIView *)ttFirstResponder;
{
UIView *responder = recursiveFirstResponderSearchInView(self);
return responder;
}
@end
I got two apps accepted this week, both using the September 8 version
(969d6f6, extended with some bugfixes).
--
Regards,
Eelco Lempsink
I should add that TTMessageController does not use firstResponder WRT
UIWindow. It just has text strings to store which text field was the
firstResponder during persist/restoreView calls. Should have looked
closer in Project Find but I never use the class and don't include in
my local project variant.
Cheers,
David
>
> I just got rejected for the exact same thing grrrrr. So what do we
> do????
Did you use the altered Three20 fork from Mike D?
Regards,
Marcin.
On Wed, Nov 4, 2009 at 11:47 AM, neptune2000 <papa....@gmail.com> wrote:
>
>
> Follow the directions on the three20 page EXACTLY. Be 100% certain
> your header search paths are setup properly. Be 100% certain the
> external project is linked and set as a dependency.
>
Confirmed. In a properly configured project I replaced regular with
forked version and had no errors at all.
>>
>> When I exchange my old 320/src folder for the uprise78/three20-P31
>> at:
>>
>> http://github.com/uprise78/three20-P31/blob/03ac3948c59f0adaec71b32c22fd0ea6198bb9d6/index.html
>>
>> I get 93 errors when I compile. There must be a step I'm missing.
>> Any help please?
My blind guess is you've replaced regular 'src' content with full
blown forked project content thus the header files are located in a
wrong place.
Double check what you have done.
Regards,
Marcin.
>
> I was also bit by this and had an app rejected. I've resubmitted with
> the three20-P31 fork, but is there a utility that will scan the
> compiled app for use of private APIs? Maybe something that lists a
> symbol table of all methods called? What does Apple use in their
> review process?
I wish they have shared the tool, at least as a part of the submission
process. This would be a great help for everyone.
On the other hand I can imagine this will never happen as this would
raise many issues
beggining with "why have you rejected my app? it was fine with the
tool".
Regards,
Marcin.
>
> They could perhaps integrate it so that your binary is scanned at
> Upload time, much as they validate the version number and bundle id in
> Info.plist.
Just another reason to give you an ambigous rejection message and
leave without a clue.
I think I rather like the tension growing for weeks and then a sudden
hit with the rejection bat:)
Regards,
Marcin.
>
> Just use 'nm' from the terminal, works great.
>
> -Gavin.
... matching the output against a list of symbols gathered from all
the frameworks withing the SDK.
That will do the job.
Thanks for the push Gavin:)
Regards,
Marcin.