How to load a UIView when a button clicked ? With a UIViewController ?
Hi,
I have a view controller which is loaded in a Window at the launch of the application. But I would like to load a UIView when I click on a button.
I have the files below :
- simpleAppDelegate.h
- simpleAppDelegate.m
- mainViewController.h
- mainViewController.m
How can I do with Xcode and IB ?
Thank you a lot !
Message was edited by: @pocalyps0
If you want to display a second, full-screen view which has its own view controller I would recommend studying the Utility Application template (Xcode File->New Project...). This is a very instructive template and your time will be well spent even if your goal requires a different behavior.
If you just want a smaller subview to appear on your main view, you can add a UIView in IB just as you would add a UILabel or UIButton, and change its hidden property in your code. If you'd rather not create the subview until it's needed and/or you want it to have it's own view controller, you may want to define it in a separate nib file and your study of the Utility template will probably help you see how to do this.
Similar Messages
-
How to popup a menu when rigth button clicked?
Hi, i have a mouse listener on a Jtree, it is working fine and now i want that when the user clicks in the right button of the mouse, a popUp menu appears with diferent options depending on the type of node....i only need to know how do make the menu to appear...
thanksI have had this same problem. For me it always occurs on Mandrake (I've only tried 8.0 and 8.1), but I have never had it occur on other Linux distributions such as Red Hat or Debian.
Quick caveat: Although Sun says that this is not a
bug I have installed Java on 5 different computers
with various versions of Mandrake Linux (7.1, 8.0, and
8.1) In these installations a left click (the main
button click) will return a mouse event with a button
mask of BUTTON1_MASK + BUTTON3_MASK instead of simply
BUTTON1_MASK. This makes your popup window appear on
every mouse click instead of just right button click.
The solution (until this bug is fixed) is to see if
the int returned from the getModifiers() method on
mouse event == BUTTON1_MASK + BUTTON3_MASK and if it
does then DONT popup the window.
Oddly enough, I've had other people test this and they
tell me that the mouse events return the proper button
mask but every time I've tested it I get this bug.
Just a FYI. If you see that behavior then this is how
to fix it. -
How to Show new Form when play button click?
Hai all,
i have 3 file. the first is quiz.as that contain two button. play and invite friend.quiz.fla. and quizapp.***. when i click play button i want to show the quiz that store in quizapp.as. int the quiz.as i have the mouse event that call quiapp.but when i run i got an error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at QuizApp/createButtons()
at QuizApp()
at Quiz/playQuiz()
in createButtons(), i create three button next,prev and finish.
whereas, in my quiz.fla library i have drag the button into my library but the error show nuul object reference for the button that i have created. can you help me to give some advice or sample code??Can you please elaborate more as the problem is not quite clear.
However if you have the button instances placed on the stage already check if you have tick the "automatically declare stage instances" in your publish settings.
Attach your code in a zip on this forum may be we can solve it then.
P.S. :- Also you can access these buttons available in stage only in the document class. -
I cannot find how to keep previous photo albums loaded on Ipad when syncing new ones with iTunes. The old ones are wiped out every single time
If it's not too late, see Recovering your iTunes library from your iPod or iOS device. As long as you have a backup of the device when the device still held your photos you should stand a chance of recovering them using a tool such as iPhone Backup Extractor.
tt2 -
Does anyone know how to load ACR presets when using ACR in the creative cloud?
Does anyone know how to load ACR presets when using ACR in the creative cloud?
Moving the discussion to Adobe Camera Raw forum.
Thanks,
Atul Saini -
I have just installed os7. How do I close apps when I double click on home button
I have just installed os7. How do I close apps when I double click on home button
Swipe to the app you want to close, press and hold the large image and swipe up and off the screen
-
Multiple flash files change when a button click using javascript function
hi.. am new in flsh...
i want to multiple flash files change when a button click using a javascript<script>
var count=0;
function mafunct(newSrc){
alert("hi");
var path="a"+count+".swf";
flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';
flash+='<PARAM NAME=movie VALUE="'+path+'">';
flash+='<PARAM NAME="PLAY" VALUE="false">';
flash+='<PARAM NAME="LOOP" VALUE="false">';
flash+='<PARAM NAME="QUALITY" VALUE="high">';
flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
flash+='</EMBED>';
flash+='</OBJECT>';
count++;
alert(path+"aa");
</script>
<button onclick="mafunct()">next</button> -
How can I increase resolution when burning a dvd with elements 11 premiere
How can I increase resolution when burning a dvd with elements 11 premiere
I am trying to generate a slide show DVD....the pictures on the TV are poor qualityWelcome to the forum.
As Steve points out, a DVD-Video is set in resolution, to 720 x 480 (for NTSC), in either Standard 4:3, or Widescreen 16:9. That is as good as it can get, and is not a limitation of PrE, but of the DVD-Video specs, which were written a long time ago.
The best that one can get is to play that DVD-Video on an up-rezzing DVD player, or most BD players, that also have up-rezzing, to an HD TV monitor. Those players have dedicated chips, JUST for up-rezzing.
Then, and per Peru Bob's questions, I attain the ultimate Still Images to DVD-Video, by doing my Scaling in Photoshop, and using either the Bicubic Sharper, or Bicubic Smoother Scaling algorithms. I Scale my Camera RAW Images to match my Project's Frame Size, and Crop, where necessary to match the Aspect Ratio of my Images, to the Aspect Ratio of the Project, i.e. if going to a 16:9 Widescreen, I will lose some pixels top and bottom, but I account for that, per my asesthetic.
Note: some PrE users insist that the Scaling in PrE is as good as Photoshop's, but my critical eyes point to using PS. Also, I do NOT use JPEG, which is a lossy, compressed format, and will Save_As PSD from Photoshop, for ultimate quality.
Good luck, and please let us know the pixel x pixel dimensions of your Images.
Hunt -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
How to open a Filechooser on a button click from jsp page
can anyone tell me how to open a Filechooser on a button click from a jsp page.
Thanks<input type="file" name="myfile">
-
How to add custom information, when Information button "I" is clicked
Hi All,
I have developed a custom collective search help, Now i need to display custom information to the all elementary search help's when Information Button "i" is clicked.
thanks in advanceHi,
see the given link.
custom control
Regards,
Shamma -
New window everytime when submit button clicked in JSF
Hi all,
I am facing an issue where I need to popup a new window everytime the submit button on my JSF form is clicked.
I have tried several methods but none is working to my purpose.
1. Add a target="_blank" attribute in the JSF form. The problem is that even if any of my ValuechangeListeners get invoked, the page is rendered in a new window. My ValuechangeListeners work on onchange="submit()".
2. Invoke a new window from javascript and name the window as say" new" . Also name the form's target as "new" but this does not generate a new window everytime and also problem 1 persists.
3. If i use actionlistener and onclick event on button in the form, then the new page is rendered in both current page and new window.( javascript for new window is written).
What I need is when a person clicks on submit button in the form, a new window should always popup up and the page should be rendered in the new window. The original form should remain as it is so that a user can again do a submit and get a new window.
Please suggest.devayani wrote:
Thanks all for the replies.
Try onchange="this.form.target='_self';submit();"This works fine if all the valuechangelisteners are invoked. Suppose,if I dont select the radio
button and dont select any values in list box. Now if i click submit, since the target=_blank,
the page giving validation errors (for not selecting the list box)
renders in a new page. As expected behavior, not my solution.
If you need validation to remain in the same window (and that seems like the best for the user experience you have described), then delay the creation of the new window until after the request finishes. I.e., your page should always go back on itself. Under the right conditions (which you can set in your action method) it conditionally writes JavaScript which targets the new window.
>
Try returning false from the onclick event.I had tried it long back, so I just messed it up while writing, there were no actionlisteners.
sorry about my third solution, lets consider solution 2 as below:
Javascript
<script type="text/javascript" >
function newWindow(){
window.open('','mywindow','width=400,height=200');
return false;
</script>
JSF
<h:form id="Frm_New" target="mywindow">
<h:commandButton id="btn_submit" disabled="false"
action = "#{TestBean.submitValues}"
value="#{bundle.SC_SUBMIT}"
onclick ="newWindow()">But again this approach has above problems and also no new window everytime. For new window you said:
Append a time stamp or random number to
the end of the window name.This solution will not work as I have to reset the target for my form everytime to this new window name.You can remember the name of the window if necessary. Although you seem to be changing things on the fly; earlier the problem was you didn't get a new window every time. Or are you just confused on how to set the target?
onclick="var wname = getWindowName(); createNewWindow(wname); this.form.target = wname; return true;">
I was trying to actually set the target of the form as _blank at runtime during one of the phases of JSF lifecycle ( by using phaselistener). Although its not working as of now. Does this sound a good approach
This is because I dont think that setting it on jsf would work as the page rendering on a new window( in my case) not only depends on clicking the submit button only but it depends on whether the user is done with all vaildations and now has to see the final result into new window.This would be addressed by the conditional JavaScript solution above. -
How to open multiple report windows on button click without losing session?
Hi,
JDev : 11.1.1.2.0
I am trying to open multiple discoverer plus report windows using my ADF application.
My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
Regards,
DevDsURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
If this is not a right approach then let me know how to pass the parameter in jsp page. -
TabNavigator - How to change what happens when a user clicks a tab
I am using a TabNavigator in my Flex application and I'd like
to be able to change what happens when a user clicks a tab on the
TabNavigator. I'd like to be able to handle the click on the tab
myself and stop Flex from perfoming it's default actions. Anyone
have a clue how to do this? Any help would be much appreciated!
MikeYeah, in the following code, the changeHandler has an effect
but the click effect does not:
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function clickHandler():void{
accounts.setStyle("fontSize",20);
stocks.setStyle("fontSize",20);
futures.setStyle("fontSize",20);
private function changeHandler():void{
accounts.setStyle("fontSize",7);
stocks.setStyle("fontSize",7);
futures.setStyle("fontSize",7);
]]>
</mx:Script>
<mx:TabNavigator borderStyle="solid"
click="clickHandler()" change="changeHandler()">
<mx:VBox id="accounts" label="Accounts"
width="300"
height="150">
<mx:Label text="Accounts"/>
</mx:VBox>
<mx:VBox id="stocks" label="Stocks"
width="300"
height="150">
<mx:Label text="Stocks"/>
</mx:VBox>
<mx:VBox id="futures" label="Futures"
width="300"
height="150">
<mx:Label text="Futures"/>
</mx:VBox>
</mx:TabNavigator>
</mx:Application> -
Popup window when radio button clicked
Hello,
I have a button that has a URL redirect of:
javascript:popUp2('f?p=&APP_ID.:8:&SESSION.::NO:::', 400, 400);
This opens a separate window.
Now I want this to happen when the user clicks on a radio button on that page.
Thank you,
MattYou dont have to put this in html head..
ON THE PAGE RENDERING SECTION..
UNDER ITEMS... FIND THE RADIO BUTTON ITEM AND CLICK ON THAT..
U WILL SEE DIFFERENT TAB OVER THERE... LIKE .. SHOW ALL , NAME , DISPLAYED , LABEL , ELEMENT ... ETC..
SELECT ELEMENT..
UNDER ELEMENT YOU WILL SEE
HTML FORM ELEMENTS ATTRIBUTES... IN THAT TEXT BOX U JUST HAVE TO COPY AND PASTE THE ABOVE CODE
Maybe you are looking for
-
Cannot use my Mac Mini server as Time Machine server
Hello, May some one can help me... I try to connect clients to a time Machine server, well it's seems to be a bit difficult, I created user's accounts, computers accounts, group of computers... It works for the update services, but after configuring
-
Creation of New T Code Using Transaction Variant
Hi, I have created a new T code (YMM02) by using transaction variant. The new T code created is copy of MM02. I have changed the material by using new T code (YMM02) which is created using Transaction variant. Once I complete the Transaction (i.e. ha
-
How do I backup without an external hard drive?
Well, the first time I asked this question it was deleted as a "rant." Seriously, how do I backup my iTunes library without an external hard drive? My HD is hanging on for dear life and I've been trying to backup my library. For years, I just used th
-
Managed accounts and the AppStore bought apps
Hi there! I have a problem with the Mac App Store, where managed accounts in our 10.7 Open Directory Server cannot open applications bought by an admin iTunes account in client machines because the client system keeps asking for the password of the
-
JDBC- RFC- JDBC Synchronous scenario (Can't see the response message)
Hello Experts, I tried this step in creating a synchronous scenario by using steps found in this site -> [http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File%28Without%20BPM%29|http://wiki.sdn.sap.com/wiki/display/XI/File-RFC-File%28Without%20BPM%2