[[UIDevice currentDevice] systemVersion] returns a string, i.e. "7.1.2".
if ([[[UIDevice currentDevice] systemVersion] compare:@"8.0"
options:NSNumericSearch] == NSOrderedDescending)
// older than 8.0
else
// 8.0 and newer
-Original Message-
From: cocoa-dev-bounces+juliuso
> What does the code you're using look like? (Also, are you on 10.9?)
The following works for me from 10.6 to 10.9 (I've left out code that
creates an NSSearchField, NSPopUpButton and NSTextField controls - all look
the same):
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
itemForItemIdentifier:
> CGPoint apoint=[[touches anyObject] locationInView:[self view]];
> [layer setPosition:apoint];
You need to disable implicit CALayer animation(s):
[CATransaction begin];
[CATransaction setDisableActions:YES];
[layer setPosition:apoint];
[CATransaction commit];
__
There could be two reasons:
> [self.view sendSubviewToBack:_menuView.view];
Is placing other UIViews in the view hierarchy on top of the menu view and
they could be eating touches.
> _menuView.view.frame=CGRectMake(-160,0,160,440);
> self.view.frame=CGRectMake(160, 20, 320, 548);
UIViews that a
> I'm looking for "something" OR some method that knows how to change (I
think) the position (I think) of the view containing a UITextField so the
TextField is visible after a keyboard comes up and covers it. Then the view
goes back to normal position once the keyboard is dismissed.
>
> Is there a
> When my app starts, I'd like to show a splash screen with a logo,
> etc, and animate it to the main screen after a short delay.
> [snip]
> Any suggestions what I could be doing wrong?
Do this in your root view controller's -viewWillAppear: method. You also
need to ensure that it only happens onc
> Ok, I agree that the selector is unknown, but we know from the
> previous line that the target responds to it. So I'd like to
> prevent this particular warning. I'm sure I ought to know how
> do do this, but how do I go about removing this warning message?
> Ideally, I'd like to do this on a file
> If anyone knows how to solve this problem, please show me your guidance.
>From some work I did earlier this year for a client, UIImagePickerController
needs to be presented modally or in a UIPopoverController. It also doesn't
handle being a root view controller very well (window.rootViewControll
FWIW: UIView sets the delegate of its CALayer to itself - one of the things
that it appears to do is to disable any implicit animations. If you add your
own CALayer to a UIView's CALayer, then you're in full control. As already
pointed out, it's easier using one of the UIView animation class method
Dave,
> I have a few questions about rendering PDFs and wondered if
> anyone here could help.
In my open source iOS PDF viewer (https://github.com/vfr/Reader) I employ
two techniques:
1) Show a low resolution image of the page below the CATiledLayer-based
zoom-able page view. These low resolutio
I would suspect that the UIImageView's autoresizingMask might be the culprit
- if it isn't UIViewAutoresizingNone, then the frame may be resizing itself
when rotated. Sometimes it is less trouble to create your own
UITableViewCell subclass and have full control over your subviews instead of
trying
Presuming that the firstgen iPod touch has iOS 3.x on it, it is probably
crashing here:
> self.window.rootViewController = self.tabBarController;
Since rootViewController was introduced to UIWindow in iOS 4.0. Pre-iOS 4.0
you need to use (from what I recall):
[self.window addSubview:self.tabBarC
Check self.thumbImageView.contentMode - it's probably the default
UIViewContentModeScaleToFill (should be UIViewContentModeCenter). Also
ensure that the UIImage that you provide really has square dimensions. I had
the exact same issue when rotating the UIImageView of a UIButton...
> I have a UIIma
>> At the moment that the operations are queued, there are some operations
in the queue not yet run, and some running. The code that creates the
operations doesn't know which ones are needed more urgently (the latest
ones), so it can only assign a high priority to all of them, so they all end
up wi
> Normally I'd set up a timer to fire in a minute, set up an
NSBlockOperation,
> and let it go. When it finishes, I'd repeat the process. But I don't see
any
> way to adjust the priority of an NSOperationQueue.
NSBlockOperation inherits from NSOperation so you should be able to
-setQueuePriority:
Have a look at +attemptRotationToDeviceOrientation in iOS 5:
http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewC
ontroller_Class/Reference/Reference.html#//apple_ref/occ/clm/UIViewControlle
r/attemptRotationToDeviceOrientation
> is the official or unofficial way to force
> leak:
> Malloc 48 bytes per incident
> libsystem_c.dylib
> studup
https://devforums.apple.com/message/630695#640345
Known bug in iOS 5.1
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
Have you looked into using UIApplication's
-beginBackgroundTaskWithExpirationHandler: in the UIApplicationDelegate's
-applicationDidEnterBackground: to give you some background run time to
finish the loop?
> My biggest problem is this: My game runs in a tight loop. When I get
applicationWillRes
> On iOS, NSOperationQueue doesn't use GCD at all.
Actually, posts by Apple people in the Developer Forums and the
documentation differs on this:
http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/NSOper
ationQueue_class/Reference/Reference.html
"Note: In iOS 4 and later, oper
You need to implement the -viewForZoomingInScrollView: UIScrollViewDelegate
method and return the image view.
Please have a look at Apple's ScrollViewSuite sample code:
http://developer.apple.com/library/ios/#samplecode/ScrollViewSuite/Introduct
ion/Intro.html
> I just added this:
> [scrollVi
> I'm looking at popovers. I'm wondering if there is any way that I'm
overlooking to make popovers modal.
The UIViewController that you present in the popover has a property named
modalInPopover:
"The default value of this property is NO. Setting it to YES causes an
owning popover controller to d
21 matches
Mail list logo