que tienen un UIScrollView con paginación habilitada como el siguiente:contenidos UIScrollView no permiten la interacción del usuario
container = [[UIScrollView alloc] initWithFrame:kScrollViewFrame];
[container setDelegate:self];
[container setShowsHorizontalScrollIndicator:YES];
[container setShowsVerticalScrollIndicator:NO];
[container setClipsToBounds:YES];
[container setPagingEnabled:YES];
[container setDecelerationRate:UIScrollViewDecelerationRateFast];
[container setBounces:NO];
[container setUserInteractionEnabled:NO];
[container setCanCancelContentTouches:NO];
[container setDelaysContentTouches:NO];
Para la UIScrollView, agrego varios UIWebViews, y establecer su interacción permitió a sí como tal.
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.frame = frame;
self.userInteractionEnabled = YES;
}
return self;
}
que rompe la paginación y todos los toques en el UIScrollView. Si configuro la interacción del usuario habilitada en NO, la página funciona, pero no puedo resaltar el texto en UIWebView. Intenté subclasificar UIScrollView como el siguiente, pero ocurren las mismas circunstancias. ¿Alguna idea?
- (id)initWithFrame:(CGRect)frame
{
NSLog(@"init");
return [super initWithFrame:frame];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"touchesBegan");
[[self nextResponder] touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"touchesMoved");
[[self nextResponder] touchesMoved:touches withEvent:event];
}
- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"touchesEnded");
[[self nextResponder] touchesEnded:touches withEvent:event];
}
¿Qué es lo que está tratando de lograr, necesita el desplazamiento de la vista de desplazamiento, desplazamiento de la vista de la web, paginación, selección? Por favor sé más específico. –
Necesito la vista de desplazamiento a la página y el usuario para poder seleccionar texto en las webvies (que son subvistas de la vista de desplazamiento) La vista web no necesita desplazarse, solo puede tener su texto seleccionado. –
He editado mi respuesta para reflejar sus requisitos, parece estar funcionando para mí. –