Click event called twice on touchend in iPad

iPad both understands touchstart/-end and mousestart/-end. Is gets fired like this: ┌─────────────────────┬──────────────────────┬─────────────────────────┐ │Finger enters tablet │ Finger leaves tablet │ Small delay after leave │ ├─────────────────────┼──────────────────────┼─────────────────────────┤ │touchstart │ touchend │ mousedown │ │ │ │ mouseup │ └─────────────────────┴──────────────────────┴─────────────────────────┘ You have to detect if the user is on a tablet and then relay on the touch … Read more

Using background-attachment:fixed in safari on the ipad

You can use this code to make a fixed background layer to hack into this problem. #background_wrap { z-index: -1; position: fixed; top: 0; left: 0; height: 100%; width: 100%; background-size: 100%; background-image: url(‘xx.jpg’); background-attachment: fixed; } And put <div id=”background_wrap”></div> into <body></body> <body> <div id=”background_wrap”></div> </body>

Does iPhone/iPad Safari require ‘Accept-Ranges’ header for video?

I found some Apple documentation that says that it does in fact need that for video. HTTP servers hosting media files for iOS must support byte-range requests, which iOS uses to perform random access in media playback. (Byte-range support is also known as content-range or partial-range support.) Most, but not all, HTTP 1.1 servers already … Read more

PDF search on the iPhone

This isn’t a simple problem to implement, but it is straightforward. For any given page you need to scan the page using the CGPDF scanner API. You need to register callbacks for PDF operators that affect text in the page – not just TJ/Tj, but also those that set font, affect the text drawing matrix, … Read more

Search NSArray for value matching value

Why not just to use predicates to do that for you?: // For number kind of values: NSPredicate *predicate = [NSPredicate predicateWithFormat:@”SELF = %@”, value]; NSArray *results = [array_to_search filteredArrayUsingPredicate:predicate]; // For string kind of values: NSPredicate *predicate = [NSPredicate predicateWithFormat:@”SELF contains[cd] %@”, value]; NSArray *results = [array_to_search filteredArrayUsingPredicate:predicate]; // For any object kind of … Read more

How can I add a watermark in a captured video on iOS [duplicate]

This code is add a text or string ON the video and after saving video you will play on any player. Most Advantage of this code is Provide video with sound. And all things in one code(that is text and image). #import <AVFoundation/AVFoundation.h> -(void)MixVideoWithText { AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:url options:nil]; AVMutableComposition* mixComposition = [AVMutableComposition … Read more