Does ist help, if you assign it this way instead:
self.context = theContext;
In your original code you're directly accessing the backed instance variable
instead of going over the property, so maybe your property-declaration is
ignored in this case.
Regards,
Mani
Am 24.01.2014 um 19:58
Please see attributedPlaceholder
Regards,
Mani
Am 27.09.2013 um 13:43 schrieb Dave d...@looktowindward.com:
Hi,
Has anyone else noticed that Placeholder text in UITextFields's is very dim
in iOS7? It looks ok in iOS 6, but in 7 it can hardly be seen?
I found this hack:
the pointer value for the save panel never changes, but the object it points
to has some serious changes of identity.
For me this sounds like an overrelease or access after release problem.
You could try to run with enabled zombie objects.
Regards,
Mani
Hitting the Shift key three times in a row turns slow animations on/off in the
Simulator of Xcode 4.
Regards,
Mani
Am 28.06.2013 um 03:33 schrieb Rick Mann rm...@latencyzero.com:
I've noticed in the past that suddenly slow animations would be turned on in
the simulator. I'm not selecting
Hi,
when using UIDocument, reading and writing the document is done asynchronously
in a separate thread. But there's one thing I don't understand: how is that
supposed to be used with non-thread-safe models? In my opinion most
straight-forward implemented models are _not_ thread-safe.
If you
discussed in the documentation?
Mani
Am 27.05.2012 um 22:49 schrieb Mike Abdullah:
The general idea is that you make some kind of copy of your model's state and
pass that as the document's content, leaving the background free to write
it at its leisure.
On 27 May 2012, at 21:35, Manfred
CGContextShowTextAtPoint(contextRef, 0, 40,
[textToDraw UTF8String], [textToDraw length]);
One bug I see here: you're passing a wrong length parameter.
CGContextShowTextAtPoint expects the length of the char array (number of bytes
of the UTF-8 encoded string), but you'e passing the
Answer to my own question:
The baselineOffsetFromBottom seems to be cached by (or in combination with) the
corresponding NSLayoutConstraint instance that uses it.
When I remove the constraint from its NSView and add it again, then
baselineOffsetFromBottom is called again. But I found no other
Hi,
I have a view hierarchy using Cocoa Autolayout (new in Lion) loaded from a nib.
After the nib is loaded, I do some additional configuration for some views
(mostly in awakeFromNib). Specifically I have a NSTextField subclass and the
additional configuration causes my custom
Hi,
is there a way to find out if the current device generally supports Siri? I'm
not interested if it's currently turned on or off. I just want to know if it is
generally possible to use Siri on the current device.
I could specifically check for iPhone 4S, but I think that's a bad idea,
Hi,
has anybody successfully used SMLoginItemSetEnabled?
It always returns false for me, whatever I try.
When googling, I do not find much about SMLoginItemSetEnabled, but a working
alternative using LSSharedFileList calls.
Is it OK to use these LSSharedFileList calls instead of
Hi,
is there a file path to the console output - visible in Xcode, e.g. when
calling NSLog, I think it's stderr - on the iPhone?
I tried /dev/stderr or /dev/fd/2 (and several other paths) but they do not
work and if I get the directory contents of /dev they really don't exist on
iOS.
stdout
From OS/X man pages and I'm thinking this probably works as well on iOS
That's what I thought, too. But unfortunately it doesn't work.
So e.g., stdout would be /dev/stdout. See if that works for you...
Does not work. I tried that:
[@\n\nTEST\n\n\n writeToFile:@/dev/stdout
Background: I have a third party library (that I am not allowed to change)
that logs to a file in Debug mode. I want to see this log output directly
in the Xcode console, because transferring log files from the iPhone is too
complicated. The library provides an API to set the file path
one of my customers is reporting that my app does not find the iTunes Music
Library.xml file. Its there and its filled with data. His iTunes runs fine.
He send me the file and to my eyes it looks fine. The way i load it is with:
NSDictionary * xmldict = [NSDictionary
Maybe the file is corrupt. In most cases it can be solved by deleting the
XML file and then making a slight change in iTunes (e.g. rename a song). The
file is then written again soon and should be fine.
Yeah, it’s a strange problem because this file gets rewritten from scratch
all the
On Mac OS X, all top-level objects get an -awakeFromNib.
On iOS, top-level objects do not get -awakeFromNib.
Uh? This was news to me and I immediately tested this.
My tests show:
- On OS X all objects of the nib including the file's owner get an awakeFromNib.
- On iOS also all objects of the
Hmm... it looks like it does draw the line... way off in the ether
somewhere...
I think I drew in the global coord system not the local to the view
Are you sure you are _not_ calling drawRect yourself, but let the system call
it when needed?
If a view needs to be redrawn, the system sets up
- (void)drawRect:(NSRect)rect {
[...]
[img drawInRect:rect ...];
}
Not related to your original problem, but please note that the NSRect passed to
drawRect is the dirty area that needs to be redrawn. In many cases this matches
self.bounds, but not always. So using this rect as
Hi,
when holding down the mouse button on an running app in Snow Leopard's Dock,
you get Exposé showing all the windows of that app.
Problem: when the app is hidden, the windows are not updated.
You can easily reproduce it e.g. with the QuickTime Player: Play a movie in
QuickTime Player and
But, the question still does remain, even if purely for academic
reasons - can we clear a UIView (in a custom UITableViewCell) in the
drawRect routine after beginning to draw in it. I have tried playing around
with two options so far
1. CGContextClearRect() - This however clears to a black
Hi,
is there some way to lower UIApplication's backgroundTimeRemaining property for
testing purposes?
I want to test the correct behaviour of an App doing some lengthy processing in
the background when the background time expires, but I always have to wait 10
Minutes for the timeout ... that's
is there some way to lower UIApplication's backgroundTimeRemaining property
for testing purposes?
I want to test the correct behaviour of an App doing some lengthy processing
in the background when the background time expires, but I always have to
wait 10 Minutes for the timeout ... that's
NSDictionary* attrs = [[NSFileManager defaultManager]
attributesOfItemAtPath:
@/some/file/with/finder/comment
error:NULL];
NSLog(@extAttrs:%@, [attrs objectForKey:@NSFileExtendedAttributes]);
NSLog(@attrs:%@, attrs);
However, I can't figure out how to determine if the NSNumber was initialized
with an int or float.
NSNumber *myNumber = ...;
CFNumberIsFloatType((CFNumberRef)myNumber);
Regards,
Mani
--
http://mani.de - friendly software
iVolume - listen to music hands-free
LittleSecrets - the encrypted
Can anyone see why the caller is getting the first match, rather than the
last?
Immense thanks to anyone who can see what's up.
I think in the line when going down the recursion, you have to assign the
result to endNode:
endNode = [self getTrieNodeFromContextSequence:mutableSeq
The problem is that when you call swapcontext() to switch the user-thread
running on a kernel-thread, the NSAutoreleasePool stack is not swapped out.
It remains rooted in thread-local storage. As a result, serious problems
result. Let me give an example.
- (void)doStuff {
Still, CGFloat is a pain when using the 64 to 32 bit truncation warning
and doing something like:
NSRect foo = NSMakeRect (1.0, 2.0, ...)
it will warn building as 32 bit since it's implicitly converting double
to float. You could do:
NSRect foo = NSMakeRect ((CGFloat)1.0,
I sent an -invalidate to my instance of NSTimer in -fire: but Instruments
told me the object was still alive. This is really confusing, I think the
instance should be released when sending an invalidate so mem-management is
clean and fine as it is in every other Apple ObjC class.
This is
Be careful, though: Some MacOS versions have a bug where .strings files had
to be UTF16 to actually work. I don't think Apple has fixed that yet.
Do you have more specific information about that?
I consequently always used UTF-8 for all my .strings files in every project I
ever worked on (for
Be careful, though: Some MacOS versions have a bug where .strings files had
to be UTF16 to actually work. I don't think Apple has fixed that yet.
Do you have more specific information about that?
I consequently always used UTF-8 for all my .strings files in every project
I ever worked on
I think there is more than one problem here. You may want to get a
good book about the C language (Obj-C is just a superset of C).
Variables i, cornerSize are passed to the function from a for loop.
i being the counter for the loop, cornerSize being the size of
corner desired by the user.
.
Regards,
Manfred Schwind
--
http://mani.de - friendly software
iVolume - listen to music freehand
LittleSecrets - the encrypted notepad
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
he problem is that on very large strings sizeWithAttributes comes up
short [no pun intended]
How much too short? Is it less than 1 pixel?
float tiw = [self stringPixelWidth:[records
objectAtIndex:i]];
if(tiw maxWidth){
I'm beginning to wonder if it's possible to save and restore the
current disclosure state of the hierarchy of a NSOutlineView.
I solved this a while ago. Here is what I am doing:
I am saving in my model if an item is expanded or collapsed. To keep
the model up-to-date, I am doing the
NSData* data = [ attrString RTFDFromRange:wholeStringRange
documentAttributes:nil ];
[ thePasteboard setData:data forType:NSRTFPboardType ];
Either use RTFDFromRange and NSRTFDPboardType or RTFFromRange
and NSRTFPboardType, but do not mix them.
Maybe that's the reason for the garbage, I
Would you tell me how to know a window finishes resizing?
You may want to look at these NSView methods:
- (void)viewWillStartLiveResize;
- (void)viewDidEndLiveResize;
- (BOOL)inLiveResize;
Regards,
Mani
--
http://www.mani.de
iVolume - Loudness adjustment for iTunes.
LittleSecrets - The
NSArray *newArray = [NSArray arrayWithArray:oldArray];
[newArray retain];
Now I it is my responsobolity to send a release message to newArray.
But am I responsible to send release messages to the contents of
newArray?
No, the NSArray is responsible for its items.
How do I do a deep copy?
You probably shouldn't be putting up a modal dialog from within the
menu-tracking runloop mode. You can use -
performSelector:withObject:afterDelay:inModes: to defer the call
that opens the modal dialog; use a delay of 0.0 but a modes array
that includes only the default runloop mode.
I have a modal dialog window that pops up at some time. I am doing
the modal session with [NSApp runModalForWindow:window].
If the user has clicked into the menu bar just before this modal
window opens, the menu is hanging down and can not be closed before
the modal window is closed.
Is
I've got a subclass of NSWindowController (a singleton in my app)
inserted after the NSApplication in the responder chain, but is
there any way for it to be the last responder before the app, such
that Cocoa automatically makes things point first to my responder
and then I can pass things
Now I want to be able to calculate the optimal width of the view so
that the entire text is visible.
This worked wonders for me:
http://www.cocoabuilder.com/archive/message/cocoa/2008/3/31/202752
This also does not solve my problem.
Getting the height of a text for a given width is easy and
Hi,
I have a layer-backed NSView, say an NSButton (or a complete view
hierarchy with many controls), and I am transforming - moving,
rotating, etc. - its layer around. Now when I try to click the
NSButton at its currently visible position, drawn by the CALayer, it
does not work. I have
43 matches
Mail list logo