Where to use :
[_addButton setBackgroundImage:[UIImage imageWithColor:[[UIColor whiteColor] colorWithAlphaComponent:0.f]] forState:UIControlStateDisabled];
UIImage+Theme.m
==============================
+ (UIImage *)imageWithColor:(UIColor *)color
{
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect); UIImage *bg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return bg;
}
Where to use :
[UIImage imageWithColor:[[UIColor whiteColor] colorWithAlphaComponent:0.f]]
Through one color Create a image More articles about
- ZeroMQ Interface function :zmq_connect - By a socket Create an external connection
ZeroMQ Official address :http://api.zeromq.org/4-0:zmq_connect zmq_connect(3) ØMQ Manual - ØMQ/3.2.5 Name zmq_c ...
- Create an instance & Create a thread ..
using System; using System.Threading; namespace WorkerThread02 { class ThreadTest { bool done; stati ...
- 【spring One of the tutorials 】 Create the simplest spring Examples
1. First spring The main idea of , It's dependency injection . Simply speaking . It just doesn't have to be manual new object , And these objects are made up of spring Containers are managed in a unified way . 2. Sample structure As you can see above , What is used is mavenproject. 2.po ...
- 【MOOC operating system 】 Test questions - Process scheduling First in first service algorithm example 【 The main memory of a multiprogramming system for users is 100K, Tape drive 2 platform , The printer 1 platform , With variable partition storage management , Static distribution of peripherals ( The process gets all the devices it needs to enter the content ), Ignore the I/O Time . Using dynamic partitioning 、 First time matching ( Start with the low address area ) Allocate main memory , A job creates a process , And running without tightening memory . Job scheduling uses FCFS Algorithm , The process in main memory adopts the shortest remaining time scheduling algorithm .】
Analysis chart : answer : (1) 8 : 00 Homework 1 arrive , Occupy resources and transfer them into main memory to run . 8: 20 Homework 2 and 3 Arrive at the same time , But homework 2 Because I can't get the printer , Can only wait in the backup queue . Homework 3 Resources satisfy , It can run in main memory , And with homework 1 divide equally CPU ...
- use eclipse pydev Create a new py When you file Of documents coding Problems setting up the
problem : When the installation is good eclipse and pydev after , Create a project, Create a new py file , The file header will have its own Chinese time . In this way, an error will be reported when compiling . One of the solutions : By setting , It can make the header of the new file automatically carry ...
- JavaWeb Create a public servlet
JavaWeb Create a public servlet, Subtract the tedious doget.dopost, Take a good look and learn . For beginners , Every time the front end transmits data, it needs to create a new class and create a doget.dopost Method , In fact, brother Tiezhu is in University ...
- Create a project and create it in GitHub Send a pull request on
1. First step : Create a repository Create a new repository : New repository Named repositories Write a short description Choose to initialize this repository with a readme file 2. The second step : Create a branch Create a new branch Go to the new repository hello- ...
- How to use Unity Create a simple HoloLens 3D Program
notes : The code sample download address mentioned in this article >How to create a Hello World 3D holographic app with Unity We talked about it once before HoloLens Created in ...
- Hands on record ( utilize django Create a blog system )
1. Add a category label , The relationship with the main table is Foreign keys class Category(models.Model): """ classification """ name = ...
Random recommendation
- dyld load Mach-O
* More technical dry goods please stamp : Listen to the cloud blog Preface Recently ObjC Of runtime How to achieve +load Implementation of hook function . And then extended the analysis of dyld Handle Mach-O This part of the mechanism . 1. Simple analysis Mach-O ...
- jQuery EasyUI Combobox Unable to get property options Value : The object is null Or undefined
The wrong way to write : $('#combobox1').combobox({ valueField: 'id', textField: 'text',data:[{id:1,text:' Ant lamb '}]}); just ...
- easyUI in onLoadSuccess Method to get multiple objects
Backstage will be a list The objects in loop are placed in map in , as follows : @RequestMapping("/getSaleOrderDetailList") @ResponseBody public ...
- curl Command line
curl Command to use Original address :http://blog.sina.com.cn/s/blog_4b9eab320100slyw.html Think of it as a command line browser 1. Turn on gzip request curl -I h ...
- jq All perverts vs All of the original metamorphosis
<script> $(function(){ var num=0; $("#btn").on('click',function(){ if(this.checked){ ...
- Hibernate In one to many and many to one relationships
1. The difference between one-way many to one and two-way many to one ? When you just need to get data from one party to the other When using one-way Association, both parties need to obtain each other's data Just use a two-way relationship department -- personnel If you only need to obtain the corresponding department information when using personnel (user.getdept ...
- 【BZOJ】3240: [Noi2013] Matrix game
The question give \(n, m(1 \le n, m \le 10^{1000000})\), seek \(f(n, m) \ \mod \ 10^9+7\) $$\begin{cases}f(1, 1) = 1 \ ...
- Multithreading ( Two )NSThread
One .NSThread Advantages and disadvantages advantage :NSThread It's the lightest shortcoming : You need to manage the thread life cycle yourself , Thread synchronization . There will be a certain amount of system overhead for thread synchronization to lock data Two .NSThread Use ...
- react Parent-child component communication
import React from 'react'; import B from './B'; class A extends React.Component{ state = { msg:' I come from ...
- Message middleware series 3 : Use RabbitMq Native Java The client communicates with the message ( consumer ( The receiving party ) Automatic confirmation mode 、 consumer ( The receiving party ) Self confirmation mode 、 producer ( The sender ) Validation mode )
preparation : 1) install RabbitMQ, Reference article : Message middleware Series 2 :RabbitMQ introduction ( Basic concepts .RabbitMQ Installation and operation of ) 2.) Create a new one named OriginalRabbitMQProducer and O ...