// The total number of columns 
int totalColumns=; CGFloat appW = ;
CGFloat appH = ; // The gap
CGFloat maginX = (self.view.frame.size.width - totalColumns*appW)/(totalColumns+);
CGFloat maginY = ; for (int i=; i<self.plistData.count; i++) { UIView * appView = [[UIView alloc] init];
appView.backgroundColor=[UIColor redColor]; CGFloat col = i%totalColumns;
CGFloat row = i/totalColumns; CGFloat appX =col*(appW+maginX)+maginX;
CGFloat appY= row*(appH+maginY)+maginY; appView.frame=CGRectMake(appX, appY,appW, appH);
[self.view addSubview:appView];
}

IOS Show more related articles in the Jiugongge list

  1. Laravel Large project series tutorial ( Four ) Display the list of articles and the articles modified by users

    I'm sorry : It's the fourth part before you know it , Thank you very much for your comments , A lot of changes bug, I hope I can continue to find fault for Xiaobian in the future ~ Xiaobian doesn't want to mislead you ~ This section , It's mainly about How to display the list of articles and let users modify articles , Let me give you a preview ( One ...

  2. A show hide list HTML Code

    A show hide list HTML Code , The trick is to put the elements on the page (“ Back to the home page ”) And control the display / Hidden elements (id=navs-menu) Put it in a common div On , And in time div The binding onmouseover and onmouse ...

  3. centos Set in apache Show a list of directories

    apache Show a list of directories in stay http.conf Add the following code to ( If there is a virtual host configuration , Add in the virtual host configuration section ), And put the index.pho,index.html,index.htm File deletion Copy code   ...

  4. iOS 6 Share list ——UIActivityViewController Detailed explanation

    iOS 6 Share list ——UIActivityViewController Detailed explanation 2013-06-03 01:42:33      Comment stay iOS 6 Then a shared list view is provided , It passes through UIActivity ...

  5. vue pack app The embedded h5, distinguish app Access and android,ios Show different download links

    vue pack app The embedded h5, distinguish app Access and android,ios Show different download links demand : own app The open login page does not display app Download link . Other places open judgment android The mobile phone jumps to android Download page chain ...

  6. wxPython Make run monkey Tools (python3)- With display device list interface

    One . wxPython Make run monkey Tools (python3)- With display device list interface   Source code  Run Monkey.py #!/usr/bin/env python import wx import ...

  7. iOS TableView Multilevel list

    The code address is as follows :http://www.demodashi.com/demo/15006.html Results the preview ### One . demand TableView Multilevel list : Expand or merge hierarchically , Get and display the sub level data step by step , Can be set ...

  8. iOS System sound list

    iOS System sound list effect explain 1. Click on cell Can make a sound 2. Just give the voice number , Can , It's very easy to use Source code https://github.com/YouXianMing/iOS-Utilit ...

  9. sublime text format html css And display function list

    sublime format html css 1.ctrl + shift + p 2. Input install package, choice install package 3. Input :HTML-CSS-JS Pretti ...

Random recommendation

  1. js Preprocessing user upload image

    A few months ago, I was bored and wrote a piece of code , I didn't expect to use it recently , I searched hard disk for half a day to find it , I haven't sorted it out yet. I use my mobile phone to take photos and upload pictures 1M To 4M Between , If it's just used as a head portrait, it can be much smaller ,1M Even a few M The transformation of graph ...

  2. Play Framework Complete implementation of a APP( 11、 ... and )

    Add permission control 1. Import Secure module, This module provides a controllers.Secure controller . /conf/application.conf # Import the secure m ...

  3. Talk about c# The evolution of asynchronous programming model in

    We will use some asynchronous programming in the programming process . stay c# Of BCL in , quite a lot api Both provide asynchronous methods , Beginners may be confused by the use of various asynchronous methods , This paper mainly combs the changes of asynchronous methods and how to use asynchronous methods . Beg ...

  4. characterCustomezition Resource packaging code analysis

    using System.Collections.Generic; using System.IO; using UnityEditor; using UnityEngine; class Creat ...

  5. Access from one computer to another mysql database

    1.       hypothesis 192.168.1.3 For the server 2.       First, in the ip by 192.168.1.103 You can ping  through function ->cmd >ping  192.168.1.3 check ...

  6. Unity3d Cooperative development projects

    Unity3d   Cooperative development projects     Communication group :63438968   I am : Grey Dragon Cooperative development of projects is crucial , The first problem is adaptive resolution ! All in all , We used IGUI plug-in unit , This plug-in has the following ...

  7. [IOS]UIWebView Save the page and read the server json data

    How to use viewView Save visited pages ? And how to get and parse the data sent by the server json data ? Through a simple Demo Let's learn ! Operation steps : 1. establish SingleViewApplication application , newly build ...

  8. docker remote api Potential safety risks

    Turn on docker Of api, The first thing to know is docker Daemons of daemon, I think daemon As Client and service A bridge connecting , Be responsible for replacing client The request is passed to service End . Default love ...

  9. Scrapy Set request header

    Crawler process, some sites set up anti-theft chain , We need to add... To the request header , modify settings.py Add... To the file DEFAULT_REQUEST_HEADERS = { 'Accept': 'text/html,appl ...

  10. Signature Cookie

    [ Signature Cookie] set-cookie Add tamper proof verification code . Such as : user_name=alex|bj95ef23cc6daecc475de   The generation rules of tamper proof captcha can be very simple :md5(cooki ...