Re: Identify extension of a file without extension

2013-09-28 Thread Charles Srstka
It will work fine for an iOS app, if you use the contents of the files in /usr/share/file/magic/ to understand the formats of the files you want to identify and use that knowledge to identify the files by looking at the bytes of the NSData object. A lot of the time there's a sequence of bytes ca

Re: Identify extension of a file without extension

2013-09-28 Thread Maxthon Chan
It will not work for iOS app. However you can include your own copy of file(1) utility in your code. It is open sourced so you can make it part of your code. On Sep 29, 2013, at 5:34, Devarshi Kulshreshtha wrote: > Thanks, will check for sure.. one more query.. will it be applicable in an > io

Re: Identify extension of a file without extension

2013-09-28 Thread Devarshi Kulshreshtha
Thanks, will check for sure.. one more query.. will it be applicable in an ios app? Mine is an iOS app. On Sat, Sep 28, 2013 at 4:29 PM, Charles Srstka wrote: > On Sep 28, 2013, at 4:17 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > 1. Is there any other way to identify

Re: Identify extension of a file without extension

2013-09-28 Thread Charles Srstka
On Sep 28, 2013, at 4:17 PM, Devarshi Kulshreshtha wrote: > 1. Is there any other way to identify file extension for the files without > extensions, say from NSData object? Have a look at the files in /usr/share/file/magic/ to get some ideas of how to identify various types of files. Charles

Identify extension of a file without extension

2013-09-28 Thread Devarshi Kulshreshtha
In my current application I am downloading few files from server, and storing them locally. Based on extension of file I am loading the file in appropriate view. Example: 1. file extensions: mov, 3gp, m4a, etc., => display in media player. 2. file extensions: rtf, pptx, numbers, etc., =>

Re: UIPageViewController page index woes

2013-09-28 Thread Noah Desch
So apparently the page control is entirely transparent by default. Try adding this to your app delegate's didFinishLaunching... method: UIPageControl * pageControl = [UIPageControl appearance]; pageControl.pageIndicatorTintColor = [UIColor lightGrayColor]; pageControl.currentPageIndicatorTintCol

Re: Very small rect in drawRect:

2013-09-28 Thread Jens Alfke
On Sep 27, 2013, at 11:53 PM, Gerriet M. Denkmann wrote: > But it does not make sense, and it might be a symptom of some problem. With all due respect, it doesn’t make sense to you because you don’t know the inside details of how view display works in AppKit. (I don’t either; there are probab

Re: Very small rect in drawRect:

2013-09-28 Thread Seth Willits
For what it's worth, I remember a 1x1 rect in NSTextView drawing being very common, though I never did figure out exactly why. I suspect it's pumped as a way to trigger something internal. -- Seth Willits ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: Very small rect in drawRect:

2013-09-28 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 14:18, Quincey Morris wrote: > On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" > wrote: > >> My CustomView (aka DriftView) has no subviews at all. It only has a >> superview: the ScrollView. > > What I was trying to draw your attention to is that the backtrace tells yo

Re: Very small rect in drawRect:

2013-09-28 Thread Gerriet M. Denkmann
On 28 Sep 2013, at 14:18, Quincey Morris wrote: > On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" > wrote: > >> My CustomView (aka DriftView) has no subviews at all. It only has a >> superview: the ScrollView. > > What I was trying to draw your attention to is that the backtrace tells yo

Re: Very small rect in drawRect:

2013-09-28 Thread Quincey Morris
On Sep 27, 2013, at 23:39 , "Gerriet M. Denkmann" wrote: > My CustomView (aka DriftView) has no subviews at all. It only has a > superview: the ScrollView. What I was trying to draw your attention to is that the backtrace tells you that the dirty region is complex (i.e. not a simple rectangle)