Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to create a view like below in my iPhone application. And I have no clue how to do it.
Description of the view: If I press the arrow indicated button icon in the view, a new view
will appear on the same view just like a popup. This is a Facebook page. I need to simulate
the same in my iPhone application.
You may refer to below links:
http://www.youtube.com/watch?v=X2JKYDF1wbM
Part-1
http://www.youtube.com/watch?v=tJJMyzdB9uI
Part-2
http://www.youtube.com/watch?v=HqFFjmhoO1c
Cocoacontrols.com is your friend. They have several controls that do what you're looking to do. Check out http://www.cocoacontrols.com/platforms/ios/controls/jasidepanels for example.
exactly what you want...
http://www.cocoacontrols.com/platforms/ios/controls/jasidepanels
http://www.cocoacontrols.com/platforms/ios/controls/hhtablistcontroller-vertical-tab-view-controller
Happy Coding!!!!!
JTRevealSidebar use this one. I have used it. its very useful and working same as facebook app
https://github.com/mystcolor/JTRevealSidebarDemo/blob/master/JTRevealSidebarV2/JTRevealSidebarV2Delegate.h
This is not working with iOS7 Giving error "UINavigationControllers are not allowed in a navigation controller!"
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I am calling a function in a different class that simply removes a lottie animation. I do this by calling...
RedeemController().removeAnimationFromSuperview()
Which enters the function (as proven by a print statement). However the animation does not disappear from the view.
When I call the same function from within the class that the animation is defined, the animation is removed from the view as expected. Here is the function. Very simple.
fileprivate func removeAnimationFromSuperview(){
animationViewDraw.removeFromSuperview()
print("Entered")
}
I would expect this animation to disappear. Thanks for your help!!!!
You are creating new instance of RedeemController that has it's own properties, instead you have to use the instance that you currently have
myControllerInstance.removeAnimationFromSuperview()
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I wrote an app in Swift where I have a page I can set settings for my game. After pressing the button for the settings, the file with the game opens. But how can I get the variable I want to set to my game file?
I tried to work around this by creating a struct in the first file where I set a variable that I can change by pressing the button and which I later call on my game page. But it didn't work (the variable needed to be static, so I couldn't change it). Also it didn't seem like a smart way for me.
struct Globals {
static var score: Int = 0
// Any other global variables you want.
}
Access by:
let score = Globals.score
You can also store information in UserDefaults to persist across launches of the app.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have an application with multiple forms. One of the forms frmHistory can be accessed from two different forms, frmClient, frmChild by clicking on cmdHISTORY. FrmHistory has a button called cmdBACK on it. What I'm trying to do is, code the cmdBACK button so when frmHistory is accessed from frmClient, upon clicking cmdBACK it would go back to frmClient (same thing from frmChild). How would I go aobut doing it?
This may not be the best answer but it is the way I know how.
I would create a hidden control on the frmHistory, i.e. lblParent. I then assign that frmHistory.lblParent = "frmChild" or frmHistory.lblParent= "frmClient" from frmChild or frmClient. In the frmHistory you check for lblParent to know which form calls it.
I did a similar thing to what KD did.
I created a global variable called g_whichForm. Upon clicking on the HISTORY button in frmParent i made it g_whichForm="Parent" and g_whichForm ="Child" for child. So when I clicked back i check if g_whichForm = parent or child then go back to the correct form.
Thanks!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am new to OOP and Swift. I have some code like this:
class ViewController: UIViewController {
var topMenuScrollView: UIScrollView!
topMenu_doSomething1()
topMenu_doSomething2()
topMenu_doSomething3()
...
}
topMenu is a scrollView I have to do many things with. I found I have to write a lot of code for this top menu in this view controller file. Therefore, should I create a new class (a new swift file) specifically for the top menu handling?
However, I only have one top menu. Is it correct to write a class for it? (because I won't have multiple instances)
What's the right way to arrange this?
The purpose of object-oriented design is as much code-reuse as it is code-comprehensibility. In your case, it sounds like your menu has a lot of detailed behavior which is specific to that menu. Well, imagine at some point you want to change or rewrite the menu; it will certainly be easier if that logic is clearly isolated.
It sounds like this is a good case for another class, but it's entirely up to you.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
you are always such an incredible help to me ... but, Im really stumped here.
A basic bond/mortgage calculator that I have worked out using some online refs & a little modification.
how I can make the REPAYMENT value change automatically, as I press the UP | DOWN buttons for the Interest Rate (int_box) & the Loan (maturity_box)... So, a sort of as you change any values the REPAYMENT (answer_box) is adjusting itself.
Ideally, I want to have that each time a value is altered, it should work out the REPAYMENT VALUE ... any help, ideas or guidence greatly appreciated!
In your increase/decrease functions call giveAnAnswer() after you change the value. This will update the repayment each time the up or down buttons are pressed.
Just call giveAnAnswer() inside increaseRATE() and decreaseRATE() methods.
Using HTML events, you can do the onchange() event for when the user changes by typing. Plus, in the Javascript add a function to your buttons to recalculate the price (As mentioned by Yate).
Example onchange(): http://www.w3schools.com/tags/ev_onchange.asp
<input name="Principal" type="text" class="bondtextbox" id="principal_box" value="2550000" onchange="giveAnAnswer()" />
Edit: Made my solution clearer. And added example for Principal textfield.