i am new to iPad developer,
i have created two or three iPad application in objective c using Xcode 4.
but now i want to create iPad application using Monodeveloper tool in C# language…
in which, i want to insert Refresh button, on my NavigationBar,
here is my code snippet,
UIBarButtonItem button=new UIBarButtonItem(UIBarButtonSystemItem.Refresh);
NavigationItem.LeftBarButtonItem=button;
i am able to see refresh button on my NavigationBar, but when i click it, my view doesn’t refreshes.
how to refresh view, any idea ?
Thanx In Advance !!
Any Help Will be Appriciated.
You are initializing a
UIBarButtonItemwithout a handler. So tapping the button does nothing.Try this:
You can also assign it after initialization:
EDIT:
Inside the handler, you must implement your own “Refresh” code, depending on what it is you want to refresh. The
UIBarButtonSystemItemenumeration merely defines the appearance ofUIBarButtonItembuttons.