Create new pages with a button using PageController - objective-c

How would I programmatically create new pages that are controlled by the PageControl dots?
I want to create a button that makes pages. Each page should be added to the set of pages that you can flip through, using the page controller.
How would I go about doing this? I know that you can create a page like this:
-(IBAction)createPage:(id)selector {
CustomPageClass *customPage=[CustomPageClass aloc];
[self.view addSubView:customPage.view];
}
However, when the button is clicked again, how do I make it so that the next "view" is on another page accesible by the PageController?
Thanks much for any help.

If I got you right, you don't have to worry about create new page. It is done automatically. I hope it helps:
http://www.iosdevnotes.com/2011/03/uiscrollview-paging/

Related

How to generate Facebook Share buttons to dynamically fetched content?

Here we have an article on how to add share buttons to a web page and it works:
https://developers.facebook.com/docs/plugins/share-button/
But on my website, I have a "Load more" button to fetch content dynamically and I have no idea how to add a Share button to newly generated items.
Obviously adding this div does not make any effect so I probably need to call some Facebook function to the newly created divs.
<div class="fb-share-button"
data-href="https://www.your-domain.com/your-page.html"
data-layout="button_count">
</div>
Is anyone aware what is the name of this magic function?
OK, found the solution here:
https://developers.facebook.com/docs/javascript/examples#dialogs
It shows how to trigger a share popup. It also gives more control over the look of the share button which is also what I've been looking for.

IBM Domino custom login form load issue

I created domcfg db on my server, made a copy of $$LoginUserForm, customize it and set proper mapping. After all those operations i am able to modify my form as i wish, but ...
All the content, which is located below the login form (i didn't change it - only modify css) - doesn't render. Here is image:
All html code, which is located above table - is loaded, but below the table - whatever i'm adding - nothing is loading below the login form. What can be wrong with this?
The Sign In button closes the form. So comment out the Sign In button. You then need to add your own button and can then add more content below it.
Here's an example of a OneUI login form:
Moving submit below the form doesn't help, so i used dirty trick. Maybe for someone it will be helpful.
add jquery to header
add custom script like:
var content = "%your content%"
$( document ).ready(function() {
$( "form" ).append(content)
});

Using specific controller in layout - CakePHP

I'm newbie in CakePHP and I have a few questions.
I'm trying to set up my first CakePHP website, and I want to display menu with links in my layout. I've created model called MenuItem, then I've created controller "MenuItemsController" and then a function show. When I access /menuitems/show/ all my links are displayed. So here's the problem. I want do call this controller in my layout so links will be visible on every subpage. First question is how to call this controller, and second how will output look like ? Do I have to create view for this cotroller if I don't want to use /menuitems/show/ or it's okay to set controller to output just array of data ?
Thank you!
First question is how to call this controller, and second how will output look like ?
Use requestAction() to request the data from the view OR better, set it based on the page you're on in your AppController::beforeFfilter() method.
In your layout simply use an element $this->element('menu'); and use the set data in it or, if you go for requestAction() do this call inside the element, you can even cache the element.
Read the links to the CakePHP book in the text, the book contains example code as well.

yii change page without background slideshow refresh

I have a website which uses backgroundstretch to display a slideshow on the background of the website. I use a normal Yii website structure where the content is displayed by: , according to the url.
Now because of the reload the slideshow starts all over again when I go to another page. Is there a way to display the new pages without having to reload the background?
Thanks in advance!
It might be possible to load pages using ajax and replace the existing content on top of your rotating slide show, but it would likely be a big architectural change to your website.
Instead you might try storing the current slideshow index in a cookie, and when you load your next page, start the slideshow on the current image instead of the first image.

asp:Fileupload does not work in ajaxToolkit:AccordionPane

I am using asp:FileUpload in ajaxToolkit:AccordionPane but it always shows HasFile=false.
I am not using any update panel. The structure of the page is as below.
MAster page-->Master page-->.aspx page-->User control-->User control-->AccordionPane-->File upload control.
I have also set Page.Form.Attributes.Add("enctype", "multipart/form-data"). still it shows HAsFile=false.
How can I upload image file?
Till now there is one solution in my view... having another small page with only fileupload controll and call it as popup on button click - and place the button inside accordion pane.
its just a way-around... still looking for proper solution....