Hi
If I have a view inside another view, than its x,y values are relevant to its parent view.
I would like to know its x y position relative to the whole screen window-
that means 320 X 480 iphone screen window
The top left corner is 0,0 of course.
What is the way for getting its "True" x ,y values?
Thanks.
...
I have created View A and View B. My window has View A displayed on the screen. I also have a UIButton on View A. I want to switch from View A to View B when I click on the Button. I am not using any UIViewController. Is it possible to switch the views without using controller?
I am calling buttonAction method on TOUCHUPINSIDE
The prob...
I have been using UIViewControllers and initWithNibName with much success, basically using them as a convenient way to design the view with Interface Builder. Unfortunately I have built a hierarchy of views before noticing this line in the UIViewController documentation:
Note: You should not use view
controllers to manage views th...
Anyone knows? I found few answers but there were too complex and going too deep ... I need some simple answer :) ... thanks, O.
...
I'd like to "darken" a UIView by a certain amount. Right now, I'm doing the darkening like this:
UIView *overlay = [[UIView alloc] initWithFrame:mainView.bounds];
overlay.backgroundColor = [UIColor blackColor];
overlay.alpha = 0.5f;
[mainView addSubview:overlay];
Unfortunately, this also adds a semi-transparent black overlay to parts ...
Hey guys,
Although I've searched the Board and used google, I didn't get any useful results.
I've trying to make a subclass of UIView loading its view from a xib file.
My approach is the following:
1. Creating a subclass (named mySubclass):
@interface mySubclass : UIView {
}
@end
Creating a view through:
Add New File...
User Inte...
I have a method which animates one of the subviews of UIWindow and then removes it from UIWindow using removeFromSuperview. But when I put removeFromSuperview after animation block, the animation never shows, because removeFromSuperview removes the UIView from UIWindow before the animation plays :-( How can I delay removeFromSuperview so...
I have a UIButton in my MainWindow.xib
When I tap the button, I want to swap the view. How do I do that?
I also want to transfer some data between the views (such as color preference and a string)
ANy sample code OR links to where I can find my answer would be very helpful.
...
I have a subclass of UIButton called INMenuCard and I am overriding the initWithFrame to include an activity indicator. The menuCard places correctly but any internal reference to "frame" give me "inf,inf,0,0" which means my activityIndicator subview is not placed correctly. What might I be missing?
@implementation INMenuCard
- (id)ini...
I have a horizontal UIScrollView that contains UIButtons (though it could be any object). I would like to only download images for these buttons as the user scrolls and they are seen. I would also like an activityindicator running on each button while the images are downloading. Here's what I've tried with results:
Check content offset...
I have a card (a flashcard you could say)
What I can do:
On fingersweeping over the flashcard the card gets turned. It's happening by detecting
touchesBegan and touchesMoved and then I do stuff like
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationCurve:UIViewAnimationCurveEas...
Note: This may be a duplicate of Subview Doesnt AutoSize When Added to Root View Controller
I have an iPad app that switches between different views in its main window. The view-switching code looks like this:
- (void)switchToViewController:(UIViewController*)viewController {
if (currentViewController != viewController) {
...
I have a plan to make a game using OpenGL for 3D world view, and CALayer(or UIView) for HUD UI.
It's easy to imagine performance degrade from mixing them, but the document which mention this impact disappeared: http://developer.apple.com/iphone/library/technotes/tn2008/tn2230.html
I cannot find the document on current version of SDK refe...
I am doing an imaging app for iPad and it requires use of the entire screen. The approach I have used on iPhone does not appear to work on iPad. In Interface Builder I have set the UIToolbar to translucent.This code echos the dimensions of the main view before and after requesting fullscreen.
- (BOOL)application:(UIApplication *)applica...
Hi all!
I learn Cocoa Touch several days, and today have stuck while looking for way to implement a custom event. Event that I can see in Connection Inspector for my UIView subclass.
What I have:
There are a UILabel and MyView:UIView on MainVindow. MyView contains a UISlider. Interfaces for Controller and MyView
// Controller.h
@inter...
I have a simple custom view that is connected via outlet to a NIB. For this particular view, there are actions that I would like to perform on the view when it is initialized, no matter what NIB it is on.
Trouble is, neither the (id)init or the (id)initWithFrame:(CGRect)frame methods are getting called on the custom view.
Which method ...
I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here:
http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect
The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs?...
I'm making some tabs and I want to have my own delegate for them but when I try to send an action to the delegate nothing happens.
I also tried following this tutorial:
link text
But it doesn't work for me :(
Here is my code:
TiMTabBar.h
@protocol TiMTabBarDelegate;
@interface TiMTabBar : UIView {
id<TiMTabBarDelegate> __de...
My current code doesnt seem to do anything:
CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextSaveGState(currentContext);
float myColorValues[] = {1.0, 0, 0, .8};
CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB();
CGColorRef myColor = CGColorCreate(myColorSpace, myColorValues);
CGContextSetShadowWithC...
I'm trying to produce a clipping area in a UIView that's generated from path objects in its subviews. For example, I might have one subview containing a square and another containing a circle. I want to be able to produce a clip in the parent superview that's the union of both these shapes. Can someone explain how to do this? About all I...